Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A Function to Change Borders?

Status
Not open for further replies.

techsponge

Technical User
Feb 8, 2006
37
US
I am working to develop a new MS Access 2003 database.

What we would like is to place all of our text boxes on forms with a transparent background, and light gray borders. When a user mouses over a text box the border will turn dark gray, and lastly if the field has the focus the border is blue?

I have seen this functionality in Microsoft Info Path. All of the form have this behavior, and I was wondering how it could me mimicked?

Can someone tell me if such a function already exists, or if not maybe how to implement such a feature?

Many thanks
 
Maybe someone can point out where I am going wrong?

2 Functions
Code:
Public Function Gray()
Dim ctrl As Control
For Each ctrl In Me.Controls
    On Error Resume Next
       ctrl.BorderColor = 8421504
Next

End Function
Code:
Public Function DBlue()
Dim ctrl As Control
    On Error Resume Next
       ctrl.BorderColor = 4194304
End Function

The following on Mouse Move of the control
Code:
Private Sub txtYourCompanyName_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
DBlue
End Sub

Then the following on the Mouse Move of the Detail Section

Code:
Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
 Gray
End Sub

No errors but no color change either?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top