Running a SELECT statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I try to run the following
DoCmd.RunSQL "Select tblTest.* From tblTest"
I get an error 2342 A RunSQL Action requires an argument consistent with an
SQL statement. What am I missing
 
DoCmd.RunSQL will only run action queries. Your SQL statement is a select
query, therefore it doesn't work.

If you want to display the datasheet view from the query, try
DoCmd.OpenQuery method.
 
Back
Top