search boxes

jprma

Registered User.
Local time
Today, 13:26
Joined
Dec 19, 2000
Messages
18
Hi friends, I am back for help. In my database (MS ACCESS 97) I have a form named frmQueries on to which I have added a TAB CONTROL which has 5 pages. The first page is named ALPHA. On this page I have added various text boxes into which the user can type the criteria to search. To run the query, I have created for each text box a command button which makes the query run.
Obviously the query itself has the following criteria:
Like "*" & [forms]![frmQueries]![txtsearch1] & "*"
frmQueries is the form and txtsearch1 is the name of the text box into which type the information.
Do you think is possible to use just one command button for all the text boxes? How could I associate all the events to one, unique button?
Thanks
 
If the search strings are mutually exclusive, you could upon one field getting the focus, make the other search fields "" and when the user pressed the command button you can check withone of your queries to run. If the search can be combined, you will have to do your query by SQL string and concatenate all of the search strings together. You would have to do all this in VBA, the code behind the buttons.
 
Thanks for your help, but I don't think that I will be able to write such a code, it outside my expertise. Is there any change you can help me? Thanks
 

Users who are viewing this thread

Back
Top Bottom