Consulting

Results 1 to 2 of 2

Thread: IF ELSE STATEMENT to return a messagebox based on yes and no

  1. #1
    VBAX Mentor
    Joined
    Aug 2010
    Posts
    457
    Location

    IF ELSE STATEMENT to return a messagebox based on yes and no

    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?

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

  2. #2
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    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
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •