D
Damon Heron
I love this tooltip routine and have started putting it into my db. The
only thing I am asking of it is to allow the user to click on a question
mark (lblHeader) and display a form msg. It worked on the first form, and
the second, and the third. The fourth form, however, crashes at the Call.
..create line. "Object variable or with block variable not set"
I am baffled. I checked the form to make sure there weren't any
recordselectors on it, also. Here is the code of the load unload events- the
line
Dim TTip As clsToolTip
is in the form module.
************************
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.cboGr.SetFocus
With TTip
' Create the tooltip window
Call .Create(Me)' Stops here "Object variable or with block variable not
set"
' Set the tooltip window to show for 5 secs
.DelayTime = 5000
.SetToolTipTitle "TOOLTIP", 0
' ToolTip text colors
.ForeColor = vbBlue
.BackColor = RGB(192, 192, 192)
' Set the text for the Header label.
.SetToolText Me.lblHeader, "Here is the header"
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.
Tip.Cleanup ' On close, form hangs here same msg as on load.
' Release our reference to our class
Set TTip = Nothing
End Sub
only thing I am asking of it is to allow the user to click on a question
mark (lblHeader) and display a form msg. It worked on the first form, and
the second, and the third. The fourth form, however, crashes at the Call.
..create line. "Object variable or with block variable not set"
I am baffled. I checked the form to make sure there weren't any
recordselectors on it, also. Here is the code of the load unload events- the
line
Dim TTip As clsToolTip
is in the form module.
************************
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.cboGr.SetFocus
With TTip
' Create the tooltip window
Call .Create(Me)' Stops here "Object variable or with block variable not
set"
' Set the tooltip window to show for 5 secs
.DelayTime = 5000
.SetToolTipTitle "TOOLTIP", 0
' ToolTip text colors
.ForeColor = vbBlue
.BackColor = RGB(192, 192, 192)
' Set the text for the Header label.
.SetToolText Me.lblHeader, "Here is the header"
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.
Tip.Cleanup ' On close, form hangs here same msg as on load.
' Release our reference to our class
Set TTip = Nothing
End Sub