J
James C.
Can anyone tell me what is wrong with the following code. Instead of having a
cmd button call a query. I am trying to hard code the SQL directly into the
cmd procedure
Here is the "onclick procedure"
Private Sub Command42_Click()
DoCmd.RunSQL "SELECT CorplinkData.[Acct#] " & _
"FROM CorplinkData " & _
"WHERE CorplinkData.[Acct#] = 'EP*';"
End Sub
It gives me the following error "A RunSQL action requires an argument
consisting of an SQL statement"
I have tried this as well....only to have the same error:
Private Sub Command42_Click()
Dim stSQL as String
strSQL = "SELECT CorplinkData.[Acct#] " & _
"FROM CorplinkData " & _
"WHERE CorplinkData.[Acct#] = 'EP*';"
Docmd.RunSQL (strSQL)
End Sub
cmd button call a query. I am trying to hard code the SQL directly into the
cmd procedure
Here is the "onclick procedure"
Private Sub Command42_Click()
DoCmd.RunSQL "SELECT CorplinkData.[Acct#] " & _
"FROM CorplinkData " & _
"WHERE CorplinkData.[Acct#] = 'EP*';"
End Sub
It gives me the following error "A RunSQL action requires an argument
consisting of an SQL statement"
I have tried this as well....only to have the same error:
Private Sub Command42_Click()
Dim stSQL as String
strSQL = "SELECT CorplinkData.[Acct#] " & _
"FROM CorplinkData " & _
"WHERE CorplinkData.[Acct#] = 'EP*';"
Docmd.RunSQL (strSQL)
End Sub