Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2010
    Posts
    11

    Unanswered: A runsql action requires an argument consisting of an sql statement

    hi all,
    i am running an sql query SELECT * FROM tablename in an access vba module i am getting error as :
    a runsql action requires an argument consisting of an sql statement. can a SELECT statement can be used in
    the sql query to vba programming.the code i am using is :
    Sub select1()
    DoCmd****nSQL "SELECT * FROM stud"
    End Sub

    my intension is to run a sql query in vba module in access by using Docmd.k please try to help me out.

  2. #2
    Join Date
    Mar 2009
    Posts
    5,441
    Provided Answers: 14
    You can't execute a SELECT query that way, only an action query.
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •