Full Version: Stephen Lebans Tooltips
UtterAccess Forums > Microsoft® Access > Access Forms
longbow22
Howdy
I am using the following to se my tooltips, however I get an error @ Call .Create(Me) Object variable or With Block not set
I also get the same error on the Unload Event.
I have all the code modules that Mr. Lebans has in his examples.
Ideas?
!--c1-->
CODE
Private Sub Form_Load()
' Create an instance of our Tooltip class
Set TTip = New clsToolTip
' We must SetFocus to any control that can
' accept the focus in order to force Access to
' create the inplace editing Window.
Me.RefNum.SetFocus
With TTip
    ' Creat the tooltip window
    Call .Create(Me)
    ' Set the tooltip window to show for 5 secs
    .DelayTime = 5000
    .SetToolTipTitle "EMV TOOLTIPS", 0
    ' ToolTip text colors
    .ForeColor = vbBlue
    .BackColor = RGB(192, 192, 192)
    ' Set the ToolTip text for the controls on this Form
    .SetToolText Me.TagA5, setToolTip("A5")
    .SetToolText Me.Tag4F, setToolTip("4F")
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
' Because of reference issues you must invoke
' the Cleanup sub prior to releasing the
' reference to the TTip class.
    TTip.Cleanup
' Release our reference to our class
    Set TTip = Nothing
End Sub
kapeller
Hi Longbow
also us that tool tip. Very good
What you are missing, I believe is this
Dim TTip As clsToolTip
I have this under "Option Compare Database" at the top of the module.
Hopr this helps
kapeller
Hi longbow22
Further to my email I am just checking that you also have this piece of code that is needed.
longbow22
I have ALL of the example code in my current db however
bject variable or With block not set, I get both on form load and form unload.
Am I missing a reference or something?
LB
kapeller
Hi LB
Is advised I use the tool tip and it is working fine.
Then only difference I can see between your code and my is this,
You have
CODE
SetToolText Me.TagA5, setToolTip("A5")

Ohave
CODE
SetToolText Me.AssEmployerStartDate, "Double click to activate the Calendar!"

I believe your code should be
CODE
SetToolText Me.TagA5, "A5"

Hope this make sense
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.