Where Condition

A

AJS03

We have a macro to open a form and we want the form to open with the matching
record. What do we put in the where condition? And is there anything else
we should be doing? We are using Access 2007.
 
K

KARL DEWEY

The Condition in the macro just determines whether to open the form or not.
It does not determine what is presented by the form.
You use query criteria to open with the matching record.
 
S

Steve Schapel

AJS,

To open the form at a "matching record", you can use the Where Condition
argument of the OpenForm action. Depends on what it is supposed to be
matching. If you mean matching the current record on an already open
form, then the Where Condition argument will be like this:
[YourPrimaryKeyField]=[Forms]![NameOfForm]![PrimaryKeyField]
 

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