Run same parameter query from multiple forms

G

Guest

I have a query with Where statement Forms!FormName!Field = ... which works
fine. I would like to be able to run this same query from at least two
different forms. Is there an equivalent to Me!Field = ... that I can place
in the WHERE Clause so the query is not form dependent? Thanks.
 
G

Guest

Just put it on a different criteria row. If that form is not used the query
will see a NULL and not return any records and will use the form that is open.
 
G

Guest

Thanks for your response. Unfortunately when the underlying query runs it
asks for the parameter values for the missing form reference. The SQL
statment generated by the two selection criteria is "...WHERE [forms]![form
name 1]![field] = value OR [forms]![form name 2]![field] = value" When this
query is run from form name 1 a message box appears asking for the value of
forms.form name 2.field. The reverse is true when run from form name 2.

Any other ideas? Thnaks
 

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

Top