Runtime error 3075

C

Chris1

Hi,

I am struggling with this line of code and cannot solve it!

CurrentDb.QueryDefs("qryExample").SQL = strSQL

When clicking on the cmdFind button on my form,
I get this message: Runt time error 3075. Syntax error
(missing operator) in query expression...

The full sub is as follows:
Private Sub cmdFind_Click()

Dim strSQL As String

If Not EntriesValid Then Exit Sub

If Not BuildSQLString(strSQL) Then
MsgBox "There was a problem building the SQL string"
Exit Sub
End If

MsgBox strSQL

CurrentDb.QueryDefs("qryExample").SQL = strSQL

End Sub

Please can soeone have a look at it and help.
Thanks,
Chris1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top