Project database tables

A

adam

Hi everybody,

I am new to Project VBA programming, but i worked before with Access. I
realized that when i record Ms Project file in Ms Access file format, it
creates some tables in Access.

My question is can i use the data that are stored in Ms Project tables (if
that's the way it is), using Procejt's VBA with DAO or ADO connections. Ex.
Define database, recorset, or for example use Dcount to count some of the
records in a table, use SQL statements..., and so on.

Any help or leading to an article would be appreciated,

Regards
 
J

JackD

Sure. It is just a database. Documentation is on the Project CD or on any
computer with project installed. Look for the file called pjdb.htm or
projdb.htm (varies depending on version). It should tell you all you need to
know, but you might need to read it a few times and experiment until you get
the hang of it. Pay attention to the conversions table. You will need it.
 
A

adam

Jack thanks for help, but i still need the starting point to access the
database from Ms Project VBA.

For example, in Access VBA if you use;
Dim db as Database
set db = CurrentDb

you can use the properties of "db" later, easiest is to openrecordset and
loop through records.

What i actually want to know is how we start accessing the database itself.
In "PJDB.HTM", there is an example, but it uses .mpd file extension, which
is not my case, i want to use VBA in .mpp file.

Thanks again.
 
J

JackD

I don't work much with Access VBA, but it sounds like you just want to use
the Access Object library from within Project VBA. This is simple. Just add
a reference to the library. I have an example of how to do this with the
Excel object library here:
http://zo-d.com/blog/archives/programming/working-with-other-applications.html
You can do a similar thing with Access.

However, I should tell you that working with the project database is not as
easy as working with the project object model directly. You can do more with
project vba than you can using access and the project database.

Counting tasks, summing things and all of that are fairly trivial using
project vba. I'd suggest that you learn the object model rather than trying
to decipher the project database. That way you will be much more effective
than trying to parse the database with SQL statements.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top