Hi, I have a button on a subform, this opens a new form called scores. This works fine, you can then enter info into scores and it saves to the scores table.
How do I get the scores form to link to the contact subform?
I have used the following code:
However it will not link the two together, so I can not tell which score relates to which contact.
Anyone have any ideas or help on this?
Thanks
Will
How do I get the scores form to link to the contact subform?
I have used the following code:
Code:
Private Sub Command10_Click()
On Error GoTo Err_Command10_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmScores"
stLinkCriteria = "[contactID]=" & Me![contactID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command10_Click:
Exit Sub
Err_Command10_Click:
MsgBox Err.Description
Resume Exit_Command10_Click
End Sub
However it will not link the two together, so I can not tell which score relates to which contact.
Anyone have any ideas or help on this?
Thanks
Will