Criteria Linking

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to use a macro to filter ID's from form to form. For example, I
am in John Smith's record in a main form and want to go to John Smith's
record in the payroll form. Any help appreciated.
 
Connie,

Go to a new macro in the macro design window, and enter OpenForm in the
Action column, and nominate the Payroll form in the Form Name argument.
Then, in the Where Condition argument box, enter the equivalent of...
[ID]=[Forms]![MainForm]![ID]
Of course, you would substitute the name of your actual ID field and
form name.
Then you can assign this macro on the applicable event property, most
likely the Click event of a command button onthe main form.

If you would prefer to use a VBA procedure instead of a macro, enter
code using this syntax ...
DoCmd.OpenForm "Payroll", , , "[ID]=" & Me.ID
 

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