3 replies
by uditha Accepted solution
by teebes2004 Accepted solution
Using DAO you could set a QueryDef object using the name of the query on the source database. The SQL property contains the SQL string. Create another QueryDef object with the name of the query on the target database, set the SQL property and append this QueryDef object to the target database object's QueryDefs collection.
I hope this helps. I know this works as I have done this before, though I may be bit hazy on the the terminology details as it has been a while. :)
by jerry~beans&bytes Accepted solution
if you need the 2nd database to update automatically, yeah, use the code.
if it's just a one-shot, what i usually do (i.e. to move an SQL from dev to prod) is open the query in Edit mode, SQL View and simply copy the text, then go to the 2nd mdb, open the query and paste it in.
no muss, no fuss, and it gives me one more look at the code, just in case.
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending