Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tag property 1

Status
Not open for further replies.
Oct 23, 2002
110
US
I have a form which has the record source of a query which is a subset of data that the user selected on a prior form. In this subset of data there are 8 fields per record which display a value that correlates to another table (a site id). I need to take the fields that have value and populate them into a combo box on the current form. I have tried using the tag property to pull the values from textboxes, but I have not quite figured out how to use the tag property. Any ideas on a better way to do this or a point in the right direction on how to properly use the tag property? I will be dealing with NULL values.
 
If you are discussing the Tab property of a field on a form, then the Tag property is just a place to store whatever data you would like to store.
This is the Help text for the Tag property:
Tag Property
You can use the Tag property to store any extra information about a form, report, data access page, section, or control needed by your application. Read/write String.

Remarks
You can enter a string expression up to 2048 characters long. The default setting is a zero-length string (" ").

You can set this property by using the object's property sheet, a macro, or Visual Basic.

Unlike other properties, the Tag property setting doesn't affect any of an object's attributes.

You can use this property to assign an identification string to an object without affecting any of its other property settings or causing other side effects. The Tag property is useful when you need to check the identity of a form, report, data access page, section, or control that is passed as a variable to a procedure.
 
Yes, this is what I am refering to, and Yes I know what it is. The issue I was having was referencing it in the Visual Basic code - For example - I want to set the row source of a combobox to the values in a series of textboxes. I set the tag property to 4 and then cycle through the values in the textboxes to fill in the RowSource. I was having difficulty with the exact code to reference tag=4 and how to handle null values.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top