Connecting Tech Pros Worldwide Forums | Help | Site Map

How to put/edit VB script what hightlight buttons on mousemove?

AA Arens
Guest
 
Posts: n/a
#1: Nov 13 '05
When you open the Access contacts database, you will see that when you
move with your mouse over the buttons, the text become bold. This is
the VB script:

*****************************

Private Function HandleFocus(intBtn As Integer)
' This function is called when a menu option receives the focus.
' intBtn indicates which button was clicked.

Dim intOption As Integer

On Error GoTo HandleMouseOver_Err

For intOption = 1 To conNumButtons
'Show that this menu option has the focus...
If intOption = intBtn Then
Me("Option" & intOption).Visible = True
Me("OptionLabel" & intOption).FontWeight =
conFontWeightBold
Me("command" & intBtn).SetFocus
'... and turn off the focus on the other options
Else
Me("Option" & intOption).Visible = False
Me("OptionLabel" & intOption).FontWeight =
conFontWeightNormal
End If
Next intOption

HandleMouseOver_Exit:
Exit Function

HandleMouseOver_Err:
MsgBox "There was an error executing the command.", vbCritical
Resume HandleMouseOver_Exit

End Function

*********************************

My problem is that I have problems with putting this script in my
contacts base.
How to perform this in the switchboard, after "Design View", right
click on the button, OnMouseMove, [Event Procedure] and then, where to
place (and edit as far needed) in the VB editor?


Closed Thread


Similar Microsoft Access / VBA bytes