Enter a field contents to query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a sub form with a field called shop number, I have a query but would
like the query to (after clicking a button) use the shop number to populate
the query - i think command is something like Forms![FormName]![FieldName]
but this comes up and asks me for parameters - am I missing anything?

many thanks

Mark
 
To refer to a field in the sub form the syntax should be

Forms![MainFormName]![SubFormName].Form![Fieldname]

Select * From Tablename Where FieldName =
Forms![MainFormName]![SubFormName].Form![Fieldname]
 
Back
Top