multiple criteria

  • Thread starter Thread starter Ivor Williams
  • Start date Start date
I

Ivor Williams

I have a query containing a field POID. I want to set the criteria for this
field to a value obtained from one of two forms. This is what I've set as
the criteria:

[Forms]![frmChoosePONOFilt].[cboPONO] Or [Forms]![frmOrderFilt].[txtPOID]

This works OK except a dialog box pops up asking for the value in the field
of the form that is not open (which would be the same as the value in the
field in the form that is open). How can I modify the syntax in the criteria
so the dialog box does not get displayed. There are other places in the
database I would prefer to still see the dialog boxes, so turning them all
off is no an option.

Ivor
 
Most of the time these queries are record sources for forms or reports. I
recommend removing all "dynamic" criteria where possible and use the where
clause in the DoCmd.OpenForm or DoCmd.OpenReport method. This solution
allows you to open forms and reports from any form without worrying about
the issue you are having.

Another option is to open frmChoosePONOFilt invisible and set the value of
cboPONO with code. Users don't need to see the form.
 

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