Hooking into Microsoft Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey all,

Is there a way to access all the reports that have been created for an MS Access application and list them in a datagrid?

thanks in advance,
ari
 
¤ Hey all,
¤
¤ Is there a way to access all the reports that have been created for an MS Access application and list them in a datagrid?
¤

You will probably need to use DAO to do this:

Dim JetEngine As New dao.DBEngine
Dim AccessDB As dao.Database

Dim AccessReportDocuments As dao.Documents
Dim AccessReport As dao.Document


AccessDB = JetEngine.OpenDatabase("e:\My Documents\db1.mdb")

AccessReportDocuments = AccessDB.Containers("Reports").Documents

For Each AccessReport In AccessReportDocuments

Console.WriteLine(AccessReport.Name)

Next AccessReport

AccessDB.Close()
AccessDB = Nothing
AccessReportDocuments = Nothing
AccessReport = Nothing

There is an undocumented method that uses SQL with the MSysObjects table but this is a system table
that is typically secured so I can't recommend the solution.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

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

Similar Threads

Opening an Access application thru .Net 3
move up move down 1
custom control on the toolbar 1
screen flicker 1
Access MS Access VB 0
Access Microsoft Access basic tutorials 0
Access Transferring Microsoft Access database to a brand new desktop 1
Computer Crashing 8

Back
Top