match records by tracking number in two forms

WinDancer

Registered User.
Local time
Yesterday, 22:24
Joined
Oct 29, 2004
Messages
290
Using Access 2007

I have two tables/forms that are linked by the field 'trackingnumber.'

When I have the main form open I call up the second form via command button and need to have it open the record that matches the main form.

Thanks,
Dave
 
If trackingnumber is numeric:

DoCmd.OpenForm "FormNameHere", acNormal, , "[TrackingNumber]=" & Me!TrackingNumber

If text:

DoCmd.OpenForm "FormNameHere", acNormal, , "[TrackingNumber]=" & Chr(34) & Me!TrackingNumber & Chr(34)
 
Thanks for your help again, Bob :)
 

Users who are viewing this thread

Back
Top Bottom