Need to programmatically add list of reports to list box...

T

ThriftyFinanceGirl

I have code that will list tables and queries (using Currentdata.AllTables,
CurrentData.AllQueries) but there is no option for reports.

I need to generate a list of reports (and set a few restrictions on each) so
that the user can see a list of reports they have access to. Any suggestions?
 
J

JimBurke via AccessMonster.com

Just use CurrentProject.AllReports to get all of the reports.
 
J

John Spencer

you could try
CurrentProject.AllReports

OR you can use the hidden system tables to extract a list of the reports.

But you are talking about setting restrictions, so you might do what I do and
have a table that lists the reports and any additional information and use
that to control what gets dsiplayed in your list.

TblReports
fldReportName (the name of the report)
fldDisplayName (the name the human sees - usually the report title in the header)
fldescription - a longer description of the report contents
fldArchived - report is no longer displayed in the list, but is retained for
contingency that the users will decide they wanted that report after all
etc.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
T

ThriftyFinanceGirl

So building a table sounds good for setting restrictions, however, I guess
that you add things to the reports table manually to get the data into it.
Makes sense. I will try that route and let you know! Thanks!
 

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