Hi,
I have a table of notes on a 'notes' form that I need to open from a command button. The notes need to be specific to the currently 'focused' primary key called ipcisID of the main form. I cannot link them up, I have tried using the wizard but it will only link to one of the primary key ID numbers,
The code on the onclick event of the command button is:
Private Sub opennotes_Click()
On Error GoTo Err_opennotes_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmdelaynotes"
stLinkCriteria = "[ipcisID]=" & "'" & Me![ipcisID] & "'"
docmd.Openform stDocName, , , stLinkCriteria
Exit_opennotes_Click:
Exit Sub
Err_opennotes_Click:
MsgBox Err.Description
Resume Exit_opennotes_Click
End Sub
Any ideas? Thx
I have a table of notes on a 'notes' form that I need to open from a command button. The notes need to be specific to the currently 'focused' primary key called ipcisID of the main form. I cannot link them up, I have tried using the wizard but it will only link to one of the primary key ID numbers,
The code on the onclick event of the command button is:
Private Sub opennotes_Click()
On Error GoTo Err_opennotes_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmdelaynotes"
stLinkCriteria = "[ipcisID]=" & "'" & Me![ipcisID] & "'"
docmd.Openform stDocName, , , stLinkCriteria
Exit_opennotes_Click:
Exit Sub
Err_opennotes_Click:
MsgBox Err.Description
Resume Exit_opennotes_Click
End Sub
Any ideas? Thx