Form to build a query

RaunLGoode

Registered User.
Local time
Today, 12:09
Joined
Feb 18, 2004
Messages
122
I would like to create a form (frmBuildQuery) which lists the fields in a query (qryWildcard).
I would to like to put a Text Box and Option Button on the form for some of the fields in the Query.
On selection of each Option Button the value in the Text box would be written into the criteria for the corresponding query field.
Examples for fields in the query would be:
Date
Employee ID #
Invoice #
Customer #

Could somebody give me an example of the code I would need to insert the value in a form textbox into the criteria in the query? I am using Access 2000
 
More tagging along for a response, but is there a line a code (to place with a form button) that will open a build query window? I know I would find that useful, only fear would be someone switching to a delete / update / append query. Probally best to have a pop up stating not to save as well.
 
Instead of individual textboxes and option buttons, did you think about using a list box containing all of the available fields? The user can simply select any or all of them.
 
I am not sure that that user interface is any easier, but I haven't played with the list box as much at text boxes & option buttons. I tried to set one upon the fly, but I couldn't pick more than one option. I would need time to play with it more

I was really trying to focus on the code to populate the query criteria more than the User Interface. Any Ideas there?
 
If I'm understanding you, I think I do something similar; under criteria in your query:

Like "*" & [Forms]![frmBuildQuery]![qryWildcard] & "*"
 
Try downloading FindRecord2K.zip from this Access Web site. Think it'll provide what you need, plus it's an excellent learning tool.

Bob
 

Users who are viewing this thread

Back
Top Bottom