G
Guest
The follpwing code in an event procedure produces the error:
A RunSQL action requires an argument consisting of an SQL statement:
Dim strSQL As String
strSQL = "SELECT Penalties.Type,Penalties.Penalty FROM Penalties;"
MsgBox strSQL
DoCmd.RunSQL strSQL
the messabe box displays what seems to be a valid sql string. It look like:
SELECT Penalties.Type,Penalties.Penalty FROM Penalties;
when I cut the text between the " marks and paste it in a query it works
just fine and display the expected results.
what am I missing here???
A RunSQL action requires an argument consisting of an SQL statement:
Dim strSQL As String
strSQL = "SELECT Penalties.Type,Penalties.Penalty FROM Penalties;"
MsgBox strSQL
DoCmd.RunSQL strSQL
the messabe box displays what seems to be a valid sql string. It look like:
SELECT Penalties.Type,Penalties.Penalty FROM Penalties;
when I cut the text between the " marks and paste it in a query it works
just fine and display the expected results.
what am I missing here???