Setting the Current Record

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

Good Day.

I am opening one form from another. I want the current
record of the newly opened form to be based on a value
(unique)in the current record of the previous from.

Any help will be appreciated.
Thanks,
Jim
 
Jim,

If the unique value is numeric, use this expression:
DoCmd.OpenForm "FormB",,,"[CustomerID] = " & Me!CustomerID

If the unique value is a string, use this expression:
DoCmd.OpenForm "FormB",,,"[CustomerName] = '" & Me!CustomerName & "'"

Note: That's a single quote followed by a double quote after = and a single
quote between two double quotes at the end.
 
Back
Top