Where Condition

  • Thread starter Thread starter AJS03
  • Start date Start date
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.
 
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.
 
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]
 
Back
Top