Originally Posted by
ssanfu
Code:
Private Sub cmdOpenGym_Click()
DoCmd.OpenForm "frmGymnastFilter", , "gymnastID = " & Me.gymnastID
End Sub
This is provided "Me.gymnastID" is a number....
just thinking, gymnastID is a unique (albeit alphanumeric) reference, right? In that case steve's code above just needs to consider it as a string.
Code:
Private Sub cmdOpenGym_Click()
DoCmd.OpenForm "frmGymnastFilter", , "gymnastID = '" & Me.gymnastID & "'"
End Sub
This is assuming the gymnastID is identical in whichever table you're pulling the data from. If it's linked by a different primary key you'll go nowhere like this.