G
Guest
I get the following message when I click on my command button. Syntax error
(missing operator) in query expression '[POR ID]='. I have tried changing
the code as listed in other help responses, but then I get the message that
the open command has been cancelled. The code the wizard set up is as
follows.
Private Sub Item_Entry_Click()
On Error GoTo Err_Item_Entry_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Item Entry Form"
stLinkCriteria = "[POR ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Item_Entry_Click:
Exit Sub
Err_Item_Entry_Click:
MsgBox Err.Description
Resume Exit_Item_Entry_Click
End Sub
(missing operator) in query expression '[POR ID]='. I have tried changing
the code as listed in other help responses, but then I get the message that
the open command has been cancelled. The code the wizard set up is as
follows.
Private Sub Item_Entry_Click()
On Error GoTo Err_Item_Entry_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Item Entry Form"
stLinkCriteria = "[POR ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Item_Entry_Click:
Exit Sub
Err_Item_Entry_Click:
MsgBox Err.Description
Resume Exit_Item_Entry_Click
End Sub