| Member with 1,254 posts. THREAD STARTER | | Join Date: Sep 2005 Location: UK Experience: Skilled: Know all i know and little else |
10-Apr-2007, 07:49 AM
#15 |
Im back (already), I realy ought to buy a book on VB and Access.
Say i have a form (From1) it has fields A and B where A is the primary key.
I have another form (Form2) it has fields B and C where B is the primary key.
I want to create a button in Form1 which when clicked will open Form2 and go to the reocrd where B in Form 2 is the same as the B shown in Form1.
What VB will i need? I figure the VB will need to go in Form1 and this is what i have so far:
Private Sub Command1_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Form2"
DoCmd.Minimize
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord
After that im stuck |