469,290 Members | 1,922 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

Change Color of Background on Focus

I want to change the background color of each field in a form on focus to yellow and back to white when not the focus.
Is there an easy way to do this?
Feb 26 '07 #1
4 16720
I believe so, basically you want to change the value of the backcolor value

So create to events one on get focus and one on lost focus and the event will just modify the properties of the textbook

I'm going on from memory, but like

textboxname.backcolor= BLAH

I think

Scott Owens
Feb 26 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
I want to change the background color of each field in a form on focus to yellow and back to white when not the focus.
Is there an easy way to do this?
Try playing around with conditional formatting. Click on a text box and then go to the Format menu to find it.
Feb 27 '07 #3
missinglinq
3,532 Expert 2GB
Like Mary said, Conditional Formatting's the way to go! Select the control, goto Format > Conditional Formatting. Drop down the box for Condition 1 and select Field Has Focus. Now click on the Backgrounfd Color Icon and choose you're background color.
Feb 27 '07 #4
NeoPa
32,173 Expert Mod 16PB
Conditional formatting is the easiest but I believe it came in on or after Access 2K, so earlier versions will still need to use the VBA approach described by scottowens.
Feb 28 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by carramba | last post: by
reply views Thread by Wayne Wengert | last post: by
1 post views Thread by max | last post: by
13 posts views Thread by shapper | last post: by
2 posts views Thread by slinky | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.