Saturday, August 21, 2010

I'm trying to add a search field to control information on a Form with MICROSOFT Access?

I am creating a DVD rental list on MS Access. I want to include a textbox which will allow users to search the DVD's but can't work out how to do it - HELP!!!I'm trying to add a search field to control information on a Form with MICROSOFT Access?
Trying to add a textbox control on a form as a search feature will require some VBA code for a dynamic 鈥榯ext as you type鈥?search by using the 'OnChange' event as it s known for the TextBox control.





If you want a button to run the contents of a search criteria from a TextBox instead (like a parameter) then some VBA code to find records can be added starting by using the wizard utility when adding a button in a form to find records from a key field (i.e. DVD title).





This code then be modified in the module of the Form to make it more flexible using wildcard characters (*) in the search part of the VBA code.





There are other methods but would take too long explain here namely using Listbox control, row source property or Sub form links and so on.





As already mentioned, you could create a parameter query (see http://www.about-access-databases.com/pa鈥?/a> to run a Form, Report or Query instead which may be the easiest route for now until you have gathered more knowledge about VBA (if you are a newbie!)





Hope this helped.I'm trying to add a search field to control information on a Form with MICROSOFT Access?
This needs to be a parameter query, which you set up with all the fields to be extracted but in the dvd field the searcher actually types the name of the dvd and runs the query or, better still if you create a report from the query, it will come up as a parameter report and again they just type in the name of the dvd.

No comments:

Post a Comment