[AccessD] Code help Please

Joe Hecht jmhecht at earthlink.net
Tue Jan 3 16:46:03 CST 2006


Dan,

That was a winner.

Joe Hecht
jmhecht at earthlink.net
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Dan Waters
Sent: Thursday, December 29, 2005 6:50 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Code help Please

Joe,

I read through your code, and you may be able to use
Conditional Formatting.

Select your textbox, then right-click and select Conditional
Formatting.
Then under condition 1 select 'Field Has Focus'.  Then
select the backcolor
you want to use.  In your case you will pick White, assuming
that you've set
the backcolor on your other textboxes to be yellow.

Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Joe Hecht
Sent: Wednesday, December 28, 2005 11:00 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Code help Please

I still do not understand public modules

 

I have the following code for a set of text boxes

 

Private Sub txtFirstName_GotFocus()

Dim lngwhite As Long

lngwhite = RGB(255, 255, 255)

Me.txtFirstName.BackColor = lngwhite

Me.txtFirstName.SpecialEffect = 1

End Sub

 

Private Sub txtFirstName_LostFocus()

Dim lngyellow As Long

lngyellow = RGB(255, 255, 0)

Me.txtFirstName.BackColor = RGB(255, 255, 0)

Me.txtFirstName.SpecialEffect = 2

End Sub

 

How do I make modules that will trigger as each text box
gets and loses focus?

 

Thanks

 

Joe Hecht

jmhecht at earthlink.net

 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list