G
Guest
Hello all,
I have the following code on the On Click event of a command button:
Dim stDocName As String
If Not IsNull(Me.ID) Then
stDocName = "rptTopTen"
DoCmd.OpenReport stDocName, acViewPreview, ,
"[tbl_PlayLists].[RecordID] = " & Me.ID
Else
MsgBox "Select a collection.", vbOKOnly
Me.ID.SetFocus
End If
The error I recieve is:
Syntax error (missing operator) in query expression
'([tbl_PlayLists].[RecordID] = ID: 3)'
I appreciate any insight!
Renee
I have the following code on the On Click event of a command button:
Dim stDocName As String
If Not IsNull(Me.ID) Then
stDocName = "rptTopTen"
DoCmd.OpenReport stDocName, acViewPreview, ,
"[tbl_PlayLists].[RecordID] = " & Me.ID
Else
MsgBox "Select a collection.", vbOKOnly
Me.ID.SetFocus
End If
The error I recieve is:
Syntax error (missing operator) in query expression
'([tbl_PlayLists].[RecordID] = ID: 3)'
I appreciate any insight!
Renee