Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is wrong with this code?

Status
Not open for further replies.

Jeff98

Programmer
Oct 19, 2006
14
US
Sub RUN_Query()

Dim SQL_Text As String

SQL_Text = "Select * from MindMark"

DoCmd.RunSQL (SQL_Text,false)

End Sub

when I try to run it,
I kept on getting an error msg: A runsql a action requires an argument consisting of sql statement
How can I fix the problem?

THX
JEff
 
The RunSQL method requires an action SQL instruction, i.e. UPDATE, INSERT INTO, DELETE, ...
For single data retrieving you may consider the DLookUp function.
Otherwise you may play with a Recordset (either DAO or ADODB).

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top