Getting form's current record on another form

kupe

Registered User.
Local time
Today, 10:21
Joined
Jan 16, 2003
Messages
462
The main form, frmA, has general things of each record. For various specialities, there's frmB and frmC etc.

The current record on the main form is Joe Bloggs. How can I have Bloggs appear when I click frmB or frmC to find specialised details about him please?
 
use the primary key field in your frmA as the where condition to open frmB

on form A you should put

DoCmd.OpenForm "formname" , , , "[fieldname] = " & Me.fieldname
 
The command button wizard will create the code for you
 
Rich said:
The command button wizard will create the code for you

The wizard always declares a variable (stLinkCriteria) and then use that variable in the Where condition. Is the wizard's approach more efficient rather than putting "[fieldname] = " & Me.fieldname directly in the Where condition ?
 
Maxmangion
Many thanks. Appreciated very much.
Thanks too to Rich. Cheers, gentlemen
 

Users who are viewing this thread

Back
Top Bottom