PDA

View Full Version : IF ELSE STATEMENT to return a messagebox based on yes and no



wedd
12-22-2010, 10:12 AM
I have a command button of which I would like the user to click on the button and based on the code will search through an availability table to return a message that "yes the venue is available" or "no the venue is not available" the results are based on the times, rooms, dates and venues that are populated within a table and based on the entry is stored on the form. Essentially the user will manually type in the venue, time etc on the form and click on the command button to search for an availability free room, venue, time which will return an answer back to the user. Is this doable with an IF Else statement or expression or a simpler method? :help

Thanks for your suggestions and solutions:clap: ..any help is much appreciated:friends:

Imdabaum
12-23-2010, 08:01 AM
Yes. Use the input as a parameter in your query to create a recordset searching for venue= txtbox. This should show the scheduled events for the requested venue. You may want to add some time criteria for them to specify.

If the recordcount = 0 then the venue is available.
Else
That venue/time is unavailable.
Endif