Dan Waters
dwaters at usinternet.com
Thu Dec 29 08:50:09 CST 2005
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