View Full Version : "=?" Queries and forms -


kg20079
01-21-2002, 09:09 AM
I have made a query where the criteria is variable. I want to be able to select this from a drop down box on one form and then to be able to hit a button and the results to be displayed on the next form - the problem is i have only the tiniest amount of experience with access!!

But i do have the drop down box and button so far .......

Fornatian
01-21-2002, 11:01 AM
OK, seeing as you ask so nicely!

Assumptions:

1. The form where you get the criteria is called TheCritForm
2. The field on TheCritForm where you enter the criteria is called txtCrit
3. The query is called qryRecSource
4. The field that you want to compare with is called SearchHere
5. The form that will hold the results is called TheNextForm

Instructions
1. Put all the columns you want shown in TheNextForm in the query grid.
2. Under SearchHere column, in the criteria row, right click and select build, the expression builder appears
3. In the left hand box choose Forms->All Forms->TheCritForm
4.In the second column double click on txtCrit and you will see Forms!TheCritForm!txtCrit appear in the top box. Click OK.
5. Build a form and base it on qryRecSource
6. Put a button on your form that opens 'TheNextForm'

I don't think I've missed any steps out.
Come back if still stuck.

Ian

kg20079
01-21-2002, 11:59 AM
Thank you!!! You're a genius!

Karen

Fornatian
01-21-2002, 10:49 PM
The lady, she doth protest too much.