ðHgeocities.com/Heartland/Pond/4805/Form12.htmgeocities.com/Heartland/Pond/4805/Form12.htm.delayedxÀPÔJÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ0WìzOKtext/html€çhzÿÿÿÿb‰.HSun, 20 Jan 2002 13:00:35 GMTBMozilla/4.5 (compatible; HTTrack 3.0x; Windows 98)en, *¿PÔJz ---Posted by Dev Ashish---

---Posted by Dev Ashish---


Forms: OnMouseOver Effect


(Q)    How can I create a OnMouseOver effect on Access forms?

(A)    The equivalent Access form event is OnMouseMove.  We can call a function to show the desired effect and then from the surrounding section's OnMouseMove event, call a function to remove the effect.

    For each label on a form, place a call to function fSetFontBold from their OnMouseMove event and pass the label's name as an argument to the function.

[OnMouseMove]    = fSetFontBold("lblThisLabel")

From the OnMouseMove event of the surrounding detail section, call the function fRemoveFontBold.

[OnMouseMove]    = fRemoveFontBold()

Create a form level variable.

Dim mstPrevControl As String

'**************** Code Start *************
Function fSetFontBold(stControlName As String)
Const cBold = 700
Const cNormal = 400
    On Error Resume Next
    With Me(mstPrevControl)
        .FontWeight = cNormal
        .ForeColor = 1279872587
    End With
    mstPrevControl = stControlName
    With Me(stControlName)
        .FontWeight = cBold
        .ForeColor = 0
    End With
End Function
 
Function fRemoveFontBold()
Const cNormal = 400
    On Error Resume Next
    With Me(mstPrevControl)
        .FontWeight = cNormal
        .ForeColor = 1279872587
    End With
End Function
'***************** Code End ****************