Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Evansville, Indiana, USA
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Modify SQL from VBA

    I have a make table query that adds a table to a back end database. I need to modify the location of this table from VBA. Here is my query in design view:

    SELECT tblJobNumbers.ID, tblJobNumbers.[Job Number] INTO tblJobNumbersLoc IN 'C:\Program Files\Timesheet Database\TSDB JobsLoc and SubmitLoc.mdb'
    FROM tblJobNumbers
    WHERE (((tblJobNumbers.ID) Like "1249"));

    How can I modify this query in VBA?

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    You need to look into how QueryDefs work in Access. See this MSDN Article for some background, but you may want to also look at one the Access books that cover VBA in some detail.
    Wendell

Posting Permissions

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