View active control property with unbound text box

  • Thread starter Thread starter ipresler
  • Start date Start date
I

ipresler

Hi,
I am looking how to view tag property of active control with help of
unbound text box.
My idea was to bound Control Source of text box to
Form.ActiveControl.Tag or something like this.
But doesn't work. Any suggestions?

Thanks.
 
How about something like this:

make an unbound control on your form:
Name --> TagContents

put this code behind your form:
'~~~~~~~~~~~~~~
Private Function ShowMyTag()
ShowTag Me.TagContents
End Function
'~~~~~~~~~~~~~~

put this function in a general module:
'~~~~~~~~~~~~~~
Sub ShowTag(pCtrl As Control)
Dim mTag As String
mTag = Nz(Screen.ActiveControl.Tag, "")
pCtrl = mTag
End Sub
'~~~~~~~~~~~~~~

on the double-click event of each control that you want to show the tag
for -->
=ShowMyTag()

I am sure there are probably ways to streamline this further, this was
just a quick idea...ideally, you could trap an event when the
ActiveControl changes, but I do not know how to do this or if it is even
possible



Function

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote programming and Training
strive4peace2006 at yahoo.com
*
 
Back
Top