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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top