My.ADVISOR.com Sign-In
ID
Password

Member Center / Sign-Up
   
SUBSCRIPTION STATUS
If you are a subscriber to this publication, sign-in to access locked articles. To subscribe or renew go to www.AdvisorStore.com.
Go to Article
Advanced Search 

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.
By Ken Getz, technical editor

THIS ARTICLE IS SUBSCRIBER-ONLY
To read this article you must have a current Subscription or Passport for:
DataBased.Advisor.com
or
MSpro.Advisor.com

If you have a correct subscription, sign-in (pink box) to view the complete article and access any Download.

Purchase or renew your Subscription or Passport at www.AdvisorStore.com.

Click this link for help with subscriber online access.

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.

Ken GetzTechnical 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

Keyword Tags: Microsoft, Microsoft .NET Framework, Programming, Text file

ADVISORAMA
If you can't speak softly, just use the stick.

ARTICLE INFO

DataBased.Advisor.com

Web Edition: 2008 Week 50, Doc #19301

Print Edition: December 2007

SUBSCRIBER ONLY ARTICLE LOCKED


File: 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.
Subscribers, sign-in for Download link.

Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
Portions copyright ©1983-2008 Advisor Media, Inc. All Rights Reserved.
Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, Inc. in the United States and/or other countries.
Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
Hosted by Prominic.NET Website powered by
LOTUS SOFTWARE
getzk267 posted 12/01/2008 modified 06/29/2009 03:10:54 AM ztdbms/ztdbms
domino-144.advisor.com my.advisor.com 07/05/2009 02:00:40 PM