L
LT Larry via AccessMonster.com
I am trying to link a command button on a form to a report using the
following string:
Private Sub Command36_Click()
On Error GoTo Err_Command36_Click
Dim StrWhere As String
If IsNull(Text33) = False Then
StrWhere = "LastName='" & [Forms]![Emply Reports]![Text33] & ""
End If
DoCmd.OpenReport "Patrol Quarterly Use of Force Report1", acPreview, ,
StrWhere
And I am getting a Syntax error In String'(LastName='test)'
Test is the sample name I am using
Any Ideas or am I way off base???
Thanks in advance
following string:
Private Sub Command36_Click()
On Error GoTo Err_Command36_Click
Dim StrWhere As String
If IsNull(Text33) = False Then
StrWhere = "LastName='" & [Forms]![Emply Reports]![Text33] & ""
End If
DoCmd.OpenReport "Patrol Quarterly Use of Force Report1", acPreview, ,
StrWhere
And I am getting a Syntax error In String'(LastName='test)'
Test is the sample name I am using
Any Ideas or am I way off base???
Thanks in advance