is possible create button
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum 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

· Urgent Priority · Version 2007

replyReply Mon 13 Dec 2010, 13:35Delegate Astley said...

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

For upcoming training course dates see: Pricing & availability

replyReply Wed 15 Dec 2010, 15:29Trainer Anthony said...

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

replyReply Wed 15 Dec 2010, 17:07 Edited on Wed 15 Dec 2010, 17:10Delegate Astley said...

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

 

Please browse our web site to find out more about
microsoft access 2002 training and other Microsoft training courses.

Access tip:

Design View in Relationship window

Your in the Relationship window and changes are required to be made to a Table's design.

Rather than exiting the Relationship window, if you perform a right-mouse click on the table, it opens that table up in Design view

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard