Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Microsoft Project and Microsoft Access through VBA 1

Status
Not open for further replies.

Jedi420

Programmer
Jun 21, 2002
184
US
Hello,

I have a project coming up in which they want me to be able to pull table data from Microsoft Access into Microsoft Project and most likely, vice versa. I've been trying to find a straight forward resource on the web about the subject, but have just come up with more questions. Does anyone know of a good online resource that can assist me to learn what I can manipulate in both from the other. I would very much appreciate it. Thnx (^_^)!

- Jedi420

A man who has risked his life knows that careers are worthless, and a man who will not risk his career has a worthless life.
 
Hi Jedi420,

Don't know of any particular resource, but both are part of Office and use the same VBA - it should be no different from linking Access to Word, or Excel, etc. Anything you can do in one application stand-alone, you should be able to do from the other.

In Project, set References to [blue]Microsoft Access x.x Object Library[/blue] and [blue]Microsoft DAO x.x Object Library[/blue] (or ADO equivalents - I've only got half a machine at the moment and can't remember exactly what they are), then code something like ..

Code:
[blue]Dim appAccess as New Access.Application
appAccess.OpenCurrentdatabase "[i]YourPath.YourDB[/i].mdb"
:
etc.[/blue]

From Access, set a reference to [blue]Microsoft Project x.x Object Library[/blue] and code something like ..

Code:
[blue]Dim appProject as New MSProject.Application
appProject.FileOpen "[i]YourPath.YourProject[/i].mpp"
:
etc.[/blue]


Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Hey,

Thanks a bunch for the response. You definitely set my head thinking in the correct way, I believe. The exact specs for the project won't be discussed till next week, so I now have a little time to thumb around Project (whenever they come to install it on my PC). I've been doing Access databases since Access '97 with VBA, but never had to move data across apps, so this should be fun, challenging, and a good learning experience. Thanks again for the reply.

- Jedi420

A man who has risked his life knows that careers are worthless, and a man who will not risk his career has a worthless life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top