List of all forms/reports in Access

D

Daniel Cigic

Is it possible to list all forms/reports in the Access database?
I have seen Access.Application.DoCmd.OpenForm(string formName, ... ) and
Access.Application.DoCmd.OpenReprot(string reportName, ... )
but those method wants form/report names as one of arguments.
 
D

Dale Fye

Look at the currentproject.Allforms and AllReports collections.

Or, you could query the system tables mSysObjects, I cannot remember the
Type you want for forms and reports, but they should be easy to figure out.

If the system tables are not visible in your database, go to Tools ->
Options, and then click the View System Objects checkbox (I think it is on
the General tab).

HTH
Dale
 
D

Daniel Cigic

Hi Dale,

I tried to open as a current project but doesn't let me (maybe because
access file is in accdb format?),
also when I try to query mSysObject it says that I don't have permission to
it. I am using Access 2007, and couldn’t find where/how to change
permissions for systems tables. Any idea?

Thanks.
 
D

Dale Fye

No, don't have 2007 and don't know anything about the 2007 formats or access
to mSysObjects.

My recommendation would be to post to an Access specific forum,
microsoft.public.Access or Microsoft.Public.Formscoding would probably work.
 

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