Run-time error '2342' on Button Assignment

CarlRostron

Registered User.
Local time
Today, 13:20
Joined
Nov 14, 2011
Messages
88
I have allocated the foillowing Sub to a Button Clink:

Code:
Private Sub cmdGo_Click()
  Dim SQL_Text As String
  SQL_Text = "SELECT tblClient.*, tblClient.ClientName FROM tblClient WHERE (((tblClient.ClientName)=Carl));"
  DoCmd.RunSQL SQL_Text, False
  Me.Requery
End Sub

I keep getting the error message:
Run-time error '2342': A RunSQL action requires an argument consisting of an SQL Statement

I thought I had done this.

Any ideas please I can try?

Thanks
 
You may want to look up the RunSql method and read the description of what you can and cannot do with it :)

Actually, documentation is always a good place to look first.
 

Users who are viewing this thread

Back
Top Bottom