simple command button code please (1 Viewer)

timeh

Registered User.
Local time
Today, 11:02
Joined
Apr 11, 2002
Messages
23
ok, this will probably seem stupid to you, but i've got a command button on a form, and i want it to be able to open a specific record on another form
i.e.
if i have the field "member ID" on both forms (and it's a primary key and autonumber), i want to be able to go to the information from say member ID = 3 on one form, then press a button on that form, which opens the other form on record 3 (showing the details for member ID = 3 on that form.

Any help would be greatly appreciated, and please bear in mind that i'm a beginner
thanks in advance
 

Tim K.

Registered User.
Local time
Today, 11:02
Joined
Aug 1, 2002
Messages
242
Use OpenForm with criteria like this.

Private Sub cmdOpenThisRecord_Click()
DoCmd.openform "frmStaff", , , "ID = " & Me.ID
End Sub
 

timeh

Registered User.
Local time
Today, 11:02
Joined
Apr 11, 2002
Messages
23
thx mate thats great
 

Users who are viewing this thread

Top Bottom