E
Edge30
Hello,
I searched but couldn't find any posts about this matter, I apologize if
this has been treated before.
MS project 2002, MS Access 2003.
I have an access database which is the central component of my work.
I have a project which needs to use some data existing in the db above
I have a VBA macro which executes an 'import' of the data, process it and
bla bla bla...
My problem is that the 'import' feature of Project can only connect to
Access TABLES
In my Access db I gather the data needed using a QUERY. I don't want to have
all in a table because I't be a huge one
So I'd like to know:
1) is there a way to 'import' directly an access query into project?
or
2) I can use VBA to dynamically connect to access -> run a macro that will
store the query results on a temporary table -> import the temporary
table -> delete the temporary table
But for 2, I'd need some guidance as I've never connected to access from
project before (I've connected project to excel though)...
So if anybody can help me with a few lines of code, I can figure out the
rest but I need to know the basics...
This is more or less how I'd do it if it were project+excel, I need to know
what to change for access?
Dim oACC As Object
Dim sFullPath As String
Set oACC = CreateObject("?????????????")
oACC.UserControl = True
sFullPath = "D:\Projects\All\Admin.mdb"
With oACC
.Visible = False
.Open (sFullPath)
.Run "MyAccessMacro that will create the table"
Activeproject.FileOpen.... (this part imports the temporary table
::I already have it)
.????? (delete the remporary table)
.Close
.Quit
end with
I searched but couldn't find any posts about this matter, I apologize if
this has been treated before.
MS project 2002, MS Access 2003.
I have an access database which is the central component of my work.
I have a project which needs to use some data existing in the db above
I have a VBA macro which executes an 'import' of the data, process it and
bla bla bla...
My problem is that the 'import' feature of Project can only connect to
Access TABLES
In my Access db I gather the data needed using a QUERY. I don't want to have
all in a table because I't be a huge one
So I'd like to know:
1) is there a way to 'import' directly an access query into project?
or
2) I can use VBA to dynamically connect to access -> run a macro that will
store the query results on a temporary table -> import the temporary
table -> delete the temporary table
But for 2, I'd need some guidance as I've never connected to access from
project before (I've connected project to excel though)...
So if anybody can help me with a few lines of code, I can figure out the
rest but I need to know the basics...
This is more or less how I'd do it if it were project+excel, I need to know
what to change for access?
Dim oACC As Object
Dim sFullPath As String
Set oACC = CreateObject("?????????????")
oACC.UserControl = True
sFullPath = "D:\Projects\All\Admin.mdb"
With oACC
.Visible = False
.Open (sFullPath)
.Run "MyAccessMacro that will create the table"
Activeproject.FileOpen.... (this part imports the temporary table
::I already have it)
.????? (delete the remporary table)
.Close
.Quit
end with