Access Can't Find Function

J

JamesJ

I'm using the following code to set labels to bold when the
mouse moves over the labels. I gat this form Leban's (I believe).
When I move the mouse over box1 access says
The expression On Mouse Move ..... a function Access can't find.
Even when I delete [Event Procedure] from the On Mouse Move of box1
It still produces the error.
I've decopmpiled it and looked through all code for this form (I'm seeing
double).
Again, this error occurs only when the mouse moves over box1.

Private Function LabelMouseMove(strLabelName As String)

On Error Resume Next
With Me.Controls(strLabelName)
.FontWeight = 700 'Bold
End With

End Function


Private Sub box1_MouseMove(Button As Integer, Shift As Integer, X As Single,
Y As Single)

LabelNormal

End Sub


Private Function LabelNormal()

On Error Resume Next
Dim ctl As Control

For Each ctl In Me.Controls
If TypeOf ctl Is Label Then
With ctl
.FontWeight = 400 'Normal
End With
End If
Next

End Function

Thanks,
James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Form Code Help 1
How to Creating Array 2
Help with Code: OnMouseDown 1
Data Member or Object not found 3
MouseMove event 4
Custom Mouse Pointer "Out of Memory" 1
Highlighting record 3
Add New Record for Combo Box 5

Top