Use a form value to populate the parameter in a query

M

Mick

My query picks up the areas in a district when the district is entered in to
the Parameter box manually.

I am looking for a way to pick up this parameter from a value entered on a
form.

Can anyone let me know how this is done
 
N

Nikos Yannacopoulos

Mick,

Assuming the form is named MyForm and the textbox (or combo, or
whatever) on it where the user types in (or selects) a district is named
MyDistrict, the criterion in the query should be:

[Forms]![MyForm]![MyDistrict]

HTH,
Nikos
 
K

Klatuu

Identify the text box in the critera of your query:

forms!MyFormNameHere!txtDisctrict
 
B

Bharathi

I have tried to do something like this as well. But I keep getting the error
saying that "the microsoft jet engine database does not recognize
'[Forms]![MyForm]![MyField]' as a valid dield name or expression. I know
that all the names are correct. Please help.
 
Top