Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Tag Property in a Report
Alfred Curling 
      
34 hours ago
Can i reference the tag property of a report in some vba code when i run the report?

e.g i am running a report as a sub report and wish to set the month in the VBA code so that i just display that months information.  the other sub reports will essentially be the same but i wish to run through the 12 months of the year.
Richard Rost  @Reply  
          
26 hours ago
Yes. A report has a Tag property just like a form, so you can reference it in the report's VBA code with:

Me.Tag

For example, if you set the report's Tag property to a month number before opening it, the report can use that value to filter itself or set a label caption.

However, if you're using the same report as 12 subreports, I would normally use the Link Master Fields and Link Child Fields properties instead. Put the month number in the main report's record source, then link the subreport control to it. That way Access automatically filters each instance of the subreport to the appropriate month.

The important distinction is that the Tag belongs to the report object itself. If you have 12 copies of the same subreport open at once, they all share that same Tag value. So it isn't a good way to give each subreport instance a different month. Link Master/Child Fields is the cleaner solution for that situation.

This falls cleanly in the "try it yourself and see what happens" camp. Give it a shot. Let me know what happens. I haven't played with report tags in years. If you discover anything interesting, let me know. Could make a fascinating video.
Alfred Curling OP  @Reply  
      
15 hours ago
Thanks Richard

I will keep you informed
Add a Reply Upload an Image
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: 8/19/2026 7:18:34 PM. PLT: 1s