RunSQL

murray2402

New member
Local time
Yesterday, 20:55
Joined
Feb 15, 2007
Messages
2
I tried a complicated SQL statement with the RunSQL command, but that gave me an error. I tried a simple SELECT statement, and that gves me the same error.

The code that gives me the error is:
Code:
DoCmd.RunSQL "SELECT firstName FROM tblClubMembers WHERE memberId = 1;"
MsgBox memberId

The error I get says:
Run-time error '2342':

A RunSQL action requires an argument consisting of an SQL statement.

I'm guessing there is something small that I'm missing/doing wrong here.
 
If I'm not mistaken, the DoCmd.RunSQL statement will only execute 'Action' queries, like update, append, etc.

Maybe you can use the dlookup() function - :)
 
OK, Thanks I'll check it out :cool:
 

Users who are viewing this thread

Back
Top Bottom