Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Automatic List of Report Names
Richard Rost 

17 years ago
I see this is a topic you guys want to know more about. Let me first say that a REAL easy solution to this is just to make a TABLE that has your list of reports in it. Make two fields: ReportName and Description. The ReportName field is the actual NAME of the report as it appears in the database, like "CustomerSalesR" and the Description is what you want the user to see, like "Customer Sales Report."

Now, you can make a form that has a listbox (named ReportListBox) on it that just pulls from this table and shows a list of all of the reports that YOU want the user to have access to - not necessarily ALL of the reports in the database. Make the listbox have two columns (for the two fields in the report table) and the first column is the ReportName.

Now, make a command button that opens a report, but say this in the VBA code:

DoCmd.OpenReport ReportListBox, acViewPreview

Now the report that you have selected in the ReportListBox will open in Preview mode. I like this solution, and it's the one I use most often. The upside is that you can specify a descriptive name for each report, and you can only include the reports you want. The only downside is that you have to manually add new reports to the list, but how often does that happen? You could even add more text boxes to the form to specify criteria you might need, like CustomerID or dates.

There is another solution that allows you to loop through the REPORTS collection and show a list of all of the reports in the database. This requires a little more VBA, but you don't have to keep a table of report names. Again, if anyone wants to see this, let me know and I'll explain it - but I think the above solution should work for 99% of your databases.

Oooh... I'm excited now. This could actually make a real cool mini-seminar. I've added it to the WAITING LIST. If anyone's interested in seeing a video for all of this, cast your vote now.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/9/2026 7:22:42 AM. PLT: 1s