criteria for multipe query, sub-forms

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

Guest

How can I use a global variable to run several queries for multiply sub-forms.
I moved the prompt from the form open procedure to the previous forms click Job Form box so as not to get prompted multiple times for the query parameter.
 
How can I use a global variable to run several queries for multiply sub-forms.
I moved the prompt from the form open procedure to the previous forms click Job Form box so as not to get prompted multiple times for the query parameter.

It's actually simpler to use the Job Form itself as the source of the
criteria: use

=Forms![JobForm]![textboxname]

on the criteria line of all the queries.

SQL and VBA are different languages and SQL queries have no way of
seeing VBA variables, other than by writing a dumb little function
that does nothing but return the variable value.
 
Back
Top