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 
Listbox help
Carla 

16 years ago
I have seen this done but do not know how to accomplish it. I have 5 reports in an  access 2007 database. I want to have a listbox on a form that lists the report names :report1, report2, report3,report4,report5 etc. and lets the user pick the report so it can be printed. I know how to make a list box but not how to make it list forms or reports instead of items listed in a table for example. Can you point me in the right direction?

Thanks
Carla


Answer from Richard Rost:

Carla, the EASIEST solution is real simple, and involves almost NO programming. Just create a Table called "MyReports" (or whatever you want to call it). Have two fields in the table: the actual NAME of the report, and then the English description of the report.

ReportName, ReportDescription

Now, YOU type in the names and descriptions of the 5 reports that you want your users to be able to select. Use this table to feed your combo box that the user uses to pick the report.

Now, make a command button to open a report. Don't use the command button wizard (cancel it if it starts up). The command to open a report is:

DoCmd.OpenReport "ReportName", acViewPreview

This will open the report ReportName and preview it on the screen, BUT, you don't want to use "ReportName" - you want the value that the user selected in your combo box. So make sure your combo box has a good name (like ReportBox) and change the code to:

DoCmd.OpenReport Forms!MyFormName!ReportBox, acViewPreview

And there you have it.

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 9:37:07 AM. PLT: 0s