98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access VBA Training and help » Is it possible to create a button that searches records that dis
Is it possible to create a button that searches records that dis
Resolved · Urgent Priority · Version 2007
Astley has attended:
Access Advanced course
Is it possible to create a button that searches records that dis
I'm currently working on a project where on the form
I would like to search and check the availability by using a check button to search through the records of all the conference rooms that are availble and those rooms that are unavaible. By clicking the button the search will display "not avaible" or "yes,available" based on the user entering the time, date, venue on the form. Is this possible to do using vba? If so, how can this be done? Would you have any sample code? That would very helpful
Thanks for your contributions
RE: Is it possible to create a button that searches records that
Hi Astley, thanks for your query. You certainly could code this with VBA but what you're doing sounds very like a parameter query. Such a query could gather the criteria of the query from the checkboxes on the form and then simply gather the results accordingly. It's difficult to suggest how to proceed from here without seeing the database itself, but if you can run the query from within access itself to find out the availability of particular rooms, that query could then be attached to a "Run" button on your form and executed from there. Below is a link describing the VBA code you'd need to gather check box results and pass them to a query, but try experimenting with passing just the one check box result to a query before you embark on twenty!
http://www.eggheadcafe.com/software/aspnet/35669117/insert-items-from-yesno-checkbox-into-query.aspx
All the best,
Anthony
RE: Is it possible to create a button that searches records that
Hi Anthony, apologies for the misunderstanding with my question. I don't have any checkboxes on my form. I have a table with a few columns of different availble times, available dates, Date Time ID, Venues and Rooms. On my form I have a command button which when the user clicks on the button will search the records in the table and display a pop up message which will either display the particular room and venue that is entered on the form with either the following messages "room at that venue is available" or "room at that venue is unavailable" based on the search criteria of the data within the table. I can send you a sample of the database if you want to have a look at it.
Thanks for your contribution
Astley
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Relationship mapsIt is important to create proper relationships between tables. You can use Access to help check your designs and evaluate them by printing them in graphical format to help with design purposes |