Private Sub Command0_Click()
Dim objAccess As Object
Dim strdoc
strdoc = C:\\2003 Deployment Data\"
strdoc = strdoc & "2003 DA Data_be_v2.mdb"
Set objAccess = CreateObject("Access.Application")
With objAccess
.OpenCurrentDatabase strdoc
.Visible = True
.DoCmd.OpenQuery "Build Jobs Query"
'.Quit
End With
End Sub
I am trying to open a query in another access database (db1), have the results of that query import into a separate access database (db2). I've gotten db1 to open and the query to run using the above code - however, db1 closes (even though I've commented out the .quit statement) and I'm wondering how I get the query results into db2. Any thoughts would be appreciated. Thank you. Marie
Dim objAccess As Object
Dim strdoc
strdoc = C:\\2003 Deployment Data\"
strdoc = strdoc & "2003 DA Data_be_v2.mdb"
Set objAccess = CreateObject("Access.Application")
With objAccess
.OpenCurrentDatabase strdoc
.Visible = True
.DoCmd.OpenQuery "Build Jobs Query"
'.Quit
End With
End Sub
I am trying to open a query in another access database (db1), have the results of that query import into a separate access database (db2). I've gotten db1 to open and the query to run using the above code - however, db1 closes (even though I've commented out the .quit statement) and I'm wondering how I get the query results into db2. Any thoughts would be appreciated. Thank you. Marie