473,394 Members | 1,932 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 17764
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,556 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

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

Similar topics

2
by: carramba | last post by:
Hi! is it possible to change "selector" color in drop-down list? <select name="select" style="background-color: #ff0000"> <option style="background-color: #ff0000" value="1">Cony</option>...
18
by: Jan Tuxen | last post by:
Jakob Nielsen in his most recent Alertbox (http://www.useit.com/alertbox/20040503.html) tells web authors to change the color of visited links. I agree to his purpose: Help users understand...
7
by: John Baker | last post by:
Hi: I imagine there are hundreds of responses to this question, but i cant find any on the site using a search. How do you change the background color of buttons? I know there must be an easy...
0
by: Wayne Wengert | last post by:
I have a form on which I change background colors when textbox get focus and I reset the background color when it loses focus. This works fine except when I change the focus via code. If I validate...
1
by: max | last post by:
hello (is this a css or a javascript question? or both?) when hovering, I can change the background (bg) color of a field (div), e.g. http://www.bep-zuerich.ch/hover4.htm with javascript I...
3
by: viral123 | last post by:
Hi all, does any one know how to get the functionality of get focus and lost focus using ASP.Net like VB.Net I want to change the textbox back ground color when it has the focus. I used...
13
by: shapper | last post by:
Hello, I see in many web sites, such in Google, inputs that when i click on them to write something they change their style. This works both in Firefox and IE (These are the ones with which I...
2
by: slinky | last post by:
Is there a way to have the actual listed items of a ComboBox have a different background color from the base background color - e.g. all the textboxes and combos have tan as their background color,...
6
by: happyse27 | last post by:
Hi All, How do I change the height of the main menu as the height is inconsistent due to some of main menu's item stretches to 2 rows while, the other main menu's items are stretched to 1 row. ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.