I'm having trouble getting the following report to run. I keep getting the run-time error 3075.The reportText is the text box field on the form. The error seems to be in the reportsearch field.
Private Sub Command284_Click()
Dim reportsearch As String Dim reportText As String
If IsNull(Me.txtReport.Value) Then MsgBox "This box must contin a keyword" Me.txtReport.SetFocus
Else reportText = Me.txtReport.Value
reportsearch = "SELECT * FROM NCECBVI WHERE ([Last Name] LIKE """ & reportText & """ OR ([First Name] LIKE """ & reportText & """))"
DoCmd.OpenReport "NCECBVI-Report", acPreview, , reportsearch
End If
End Sub