Option Compare Database
Option Explicit
Function tooltipper(ctl, ctlName)
Dim myMe, myCtl
If TypeName(ctl) = "String" Then
Set myCtl = Forms(ctl)
Else
Set myCtl = ctl
End If
Debug.Print ctlName & Now()
Set myMe = myCtl.Controls(ctlName)
' MsgBox myctl.FormName
With myCtl.[myToolTip]
.Caption = myMe.ControlTipText
.Top = myMe.Top - 300
.Left = myMe.Left
End With
End Function
|