Run time 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
 
K

Ken Snell [MVP]

My guess is that the SQL string contains an error or wrong syntax in it, but
you haven't posted it so we can't tell.
 
D

Douglas J. Steele

Actually, he did post it in one of his many multi-posts.


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)
 

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