Results 1 to 2 of 2

Thread: how do you run a query from VBA code

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    UK
    Posts
    300
    Hi

    simple question for you.
    how do you run a query from VBA code. I normally write the sql statement out in VB and have never run a query before.

    the query is called query2 , do I put a command button on a form and type run query2 in the onclick event. Easy when you know how !

    cheers guys
    Locutus
    Resistance is futile

  2. #2
    Guest
    I believe

    opendb.QueryDefs("queryname" or index#).execute

    will do what you want.


    DerFarm

Posting Permissions

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



Click Here to Expand Forum to Full Width