RE:Linking Forms
Hayley,
I have tried using your code on my form, but I get an error that says: "Syntax error(missing operator) in query expression '[txtLineID] = 3PW4000ExMH0+00A-13+00' ".
What does this error mean?
(That long string is a concatenated field I am using as my PK)
Any help would be appreciated. The code I put in is as follows:
Private Sub cmdLaterals_Click()
On Error GoTo Err_cmdLaterals_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmLaterals"
stLinkCriteria = "[txtLineID] =" & Me![MHLineID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdLaterals_Click:
Exit Sub
Err_cmdLaterals_Click:
MsgBox err.Description
Resume Exit_cmdLaterals_Click
End Sub
Hayley,
I have tried using your code on my form, but I get an error that says: "Syntax error(missing operator) in query expression '[txtLineID] = 3PW4000ExMH0+00A-13+00' ".
What does this error mean?
(That long string is a concatenated field I am using as my PK)
Any help would be appreciated. The code I put in is as follows:
Private Sub cmdLaterals_Click()
On Error GoTo Err_cmdLaterals_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmLaterals"
stLinkCriteria = "[txtLineID] =" & Me![MHLineID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdLaterals_Click:
Exit Sub
Err_cmdLaterals_Click:
MsgBox err.Description
Resume Exit_cmdLaterals_Click
End Sub