ChrisOjeda
Programmer
I have having trouble running queries that are in an Access DB different from the one that I want to launch them from. I have part of my code that I believe works. I've tried some commands though they seem to try to run the queries from my current database (the one that the code is running from). The queries that I wish to run are Access queries.
If possible please show me the code commands assuming the three queries are "qry1", "qry2", and "qry3". Thanks... Chris
Private Sub Command5_Click()
Dim wksWorkspace As DAO.Workspace
Dim dbDatabase As DAO.Database
Set wksWorkspace = CreateWorkspace("Chris", "admin", ""
Set dbDatabase = wksWorkspace.OpenDatabase("T:\Default_Project\FC_Impact_Analysis\FC_Impact_Analysis.mdb"
dbDatabase.Close
wksWorkspace.Close
Set dbDatabase = Nothing
Set wksWorkspace = Nothing
End Sub
If possible please show me the code commands assuming the three queries are "qry1", "qry2", and "qry3". Thanks... Chris
Private Sub Command5_Click()
Dim wksWorkspace As DAO.Workspace
Dim dbDatabase As DAO.Database
Set wksWorkspace = CreateWorkspace("Chris", "admin", ""
Set dbDatabase = wksWorkspace.OpenDatabase("T:\Default_Project\FC_Impact_Analysis\FC_Impact_Analysis.mdb"
dbDatabase.Close
wksWorkspace.Close
Set dbDatabase = Nothing
Set wksWorkspace = Nothing
End Sub