ADVISOR ANSWERS
Add New Properties to Access Controls Using the TaggedValues Class
If you work with controls for long, sooner or later, you'll want to create a new property for a control. Unfortunately, in VBA, you're limited to exactly the control behavior that the original programmers provided.
Subscribers: Sign-in to activate download link -- This class effectively lets you add new properties to your controls to store whatever information you want. But you can also use it whenever you need to pass multiple pieces of information through a single parameter.
About this Article:
If you work with controls for long, sooner or later, you'll want to create a new property for a control. If Access used managed code, like Visual Studio, you could simply create a new class, inherit from the existing control's class, add the property you need, and use your new class instead of the original control class. Unfortunately, VBA doesn't support this cool technique so you're limited to exactly the control behavior that the original programmers provided. One solution is to take advantage of the Tag property that's provided for most controls and subcontrols. Here's how.
Technical Editor Ken Getz is a programmer, technical writer, educator,
and senior consultant with MCW Technologies. He's a lead courseware
author and presenter, he develops custom Windows and Web applications and tools using Visual Studio and Microsoft Office, and he's been a Microsoft MVP award winner since the program began. Ken is a frequent speaker at Microsoft events, ADVISOR SUMMIT, and other technical conferences. He's co-author of ASP.NET Developer's Jumpstart, Access Developer's Handbook series, and VBA Developer's Handbook. http://www.mcwtech.com/cs/blogs/keng