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 
Opening reports using combo box
Kirthika 

16 years ago
Hi,

I need to open some reports using combo box. I am new to access. I have created a combo box. In the after update event of the combo box i gave

DoCmd.OpenReport Me.Report, acPreview

Then in the Row source i gave

SELECT Name FROM MSysObjects WHERE Type=-32764 ORDER BY Name;

with Row source type as Table/Query.

My combo box name is Report.  However when i click the report name in the combo box, the corresponding report do not open. I don't understand what is the problem.


Answer from Richard Rost:

First of all, rather than parsing the MSysObjects table, you can make your own Reports table that has a list of all of the reports that you want in your combo box. This allows you to also give them a "description" that you can show in the combo box, and have the actual name of the report as the "bound" column - so instead of seeing "AcctRcvblR" the user can see "Accounts Receivable 30 days" for example. The downside is that you have to populate this table yourself, but you get more control over it.

Now, let's say your table is called ReportT, and you have fields: ReportName, Description. Call your combo box ReportCombo. You would just need the following code in the AfterUpdate event of your combo box:

Docmd.OpenReport ReportCombo, acViewPreview

That's it.

If you still want to parse the MSysObjects, however, I suspect the problem is that your OpenReport command is wrong.

First, it should be Me!Report not Me.Report (assuming Report is the name of your combo box). Second, it should be acViewPreview, not acPreview.

Those two things would make a big difference.

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 6:25:01 AM. PLT: 2s