Click to See Complete Forum and Search --> : Tag Property in VB6.0


September 29th, 1999, 03:56 PM
The below code throws out an error in VB 6.0, the error message is
" is not a legal control name.
Why does this error occur in the propperty sheet for the form the Tag property is blank, I havent set any form.tag property.


frmReq.Controls(Me.Tag).Text = SelectColumnValue(grdResults, 0)

czimmerman
September 29th, 1999, 04:00 PM
If you haven't set a form.tag property, frmReq.Controls(Me.Tag) will cause the error you describe. Me.tag will = ""; thus, frmReq.Controls(Me.Tag) will attempt to reference a control on the form that is named "".