• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. Working with Other Controls > Working with the Tag Property

Working with the Tag Property

Beginning VBA developers are sometimes confused by the Tag property, wondering what good it is to have a property that Access never uses. The answer is that it’s very useful indeed to have a property that you can use yourself for whatever you want. Every control on an Access form has a Tag property, and it’s up to you to decide what to put there and how to use it.

For an example of how to use the Tag property, let’s modify the HighlightControl procedure that you saw earlier in the chapter. As it stands now, this procedure sets controls to a yellow background when you enter them. But what if you don’t always want to use that color? There’s no built-in property for Access controls that says “use this color to highlight the control.” Fortunately, there is the Tag property. Here’s how to make the changes:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint