Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    47

    Unanswered: Run SQL statement in VBA?

    Can we run an SQL statement from VBA? If so what is the Syntax?

    Rgds

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    Check this out...not sure if it's what you want...


    DoCmd.RunCommand acCmdRunMacro



  3. #3
    Join Date
    Nov 2002
    Location
    The Netherlands
    Posts
    61
    You can use:

    Docmd.RunSQL strSQL

    strSQL is your Query

    Like strSQL="Select * from Table"

  4. #4
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    And of course you could change and save the SQL statement of an existing query and then run that revised query.
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

Posting Permissions

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