473,395 Members | 1,856 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,395 software developers and data experts.

Combo box background turns from white to the form's background color

I have my fields set up so that the background is white, but for some reason my combo boxes are white when the form is first opened, but as soon as you enter info into into them and tab away, the combox box turns the same color as the background color for my form. Any help is appreciated :)
May 27 '08 #1
9 12581
Stewart Ross
2,545 Expert Mod 2GB
Hi. The most likely cause is not that the colour is changing, but that the background style property of the combo is set to Transparent. In design view of your form select the combo. If the properties tabs are not showing double-click on the combo to bring up the properties. Select Back Style and set the property to Normal. If you then find that the background colour is not the same as your form, click somewhere on the form itself and from the form properties select the background colour value (stored in the Back Color property), copy it, and then select your combo again and paste the form's background colour value into the background colour property of the combo.

-Stewart
May 28 '08 #2
Steward,
Thanks for taking the time to answer my question. I checked what you suggested and I found that my Back Style was set to normal, and my Back Color was set to the code for white - just as all my other fields and combo boxes, which is what I would like them to be. They change to the background color when I enter my first keystroke into any of the fields on the form - I don't even have to enter info into those combo boxes. The thing is, it doesn't happen to all my combo boxes - I compared info in each of the tabs in the properties, and I could not come up with any differences besides where the info came from and sizing. I am stumped - any further insight is welcomed. Thank you.
Jun 3 '08 #3
Stewart Ross
2,545 Expert Mod 2GB
Hi. OK, if the background colours are as you expect them to be is there any conditional formatting set? In design view select Format, Conditional Formatting, and check that the dialogue box says no format set (as per attached screenshot). If you see conditions of some kind, this is likely to be why your background is changing. Otherwise, all I can think of is that the background colour is being changed by VBA code through an event handler in the form - the After Update event of the combo or the On Current form event being the most likely.

I am out of explanations if none of these applies.

-Stewart
Attached Images
File Type: gif formatting.gif (17.3 KB, 813 views)
Jun 3 '08 #4
Stewart Ross
2,545 Expert Mod 2GB
Hi. Further to my previous reply, if you check that there is no conditional formatting and you look instead at the possibility of event handlers, look also at the On Key Down / On Key Up events of the form itself as well as its On Current event - as you mention that the colour change happens on your first keystroke in any field.

-Stewart
... They change to the background color when I enter my first keystroke into any of the fields on the form - I don't even have to enter info into those combo boxes....
Jun 3 '08 #5
Thanks for your help Stewart - I checked all that you mentioned, and it doesn't seem to be the problem. We only had this problem after we changed to the Office 2007 - it worked normally before - who knows.
Thanks again,
Tina
Jun 3 '08 #6
Stewart Ross
2,545 Expert Mod 2GB
Sorry we couldn't resolve this one. As your form worked correctly before the upgrade to A2007 it suggests that this is a bug in the new version.

To misquote from Casablanca (the scene where Captain Renault is ordered to shut down Rick's Cafe on a pretence): "I am shocked, shocked I tell you to discover that there are bugs in this version." (OK, it was gambling in the original scene...with the punchline that Captain Renault was handed his winnings just as he ordered Rick's closed).

I still use Access 2003, and I will continue to do so for some time yet if simple things such as combo backgrounds change upon upgrade...

-Stewart
Jun 3 '08 #7
mshmyob
904 Expert 512MB
Found this.

Open the form in layout view and go all the way to the right under the auto format group of the format ribbon tab. Use the pull down to expand the options and select AutoFormat Wizard...there select the Access 2007 AutoFormat in the left column. This will reset your format settings so you will need to reapply your custom background color but it should fix the combobox issue.

cheers,
Jun 3 '08 #8
Ya Hooooo! Thank you so much - formatting it for 2007 worked! Success is so satisfying.
Thanks again
Jun 10 '08 #9
mshmyob
904 Expert 512MB
No problem... glad we could help.

cheers,

Ya Hooooo! Thank you so much - formatting it for 2007 worked! Success is so satisfying.
Thanks again
Jun 10 '08 #10

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

Similar topics

1
by: Terrance | last post by:
I'm hoping someone can help me with an issue. What's happening is I'm binding two datasets to a combo box from a dataset. The code is as follows: Try prodSet = New DataSet agenSet = New DataSet ...
4
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
1
by: Thanks | last post by:
I have a routine that is called on Page_Init. It retrieves folder records from a database which I display as Link Buttons in a table cell. I set the table cell's bgcolor to a default color (say...
11
by: Gérard Talbot | last post by:
Hello, <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <title></title> <style type="text/css"> body {background-color: white; color: black;}...
12
by: Doogie | last post by:
How do I make a value the default value for a combo box in ASP 3.0? What I have below does NOT work, yet I've seen it in HTML file examples before (and works if I put it in a HTML file by itself,...
1
patjones
by: patjones | last post by:
Hi all: I cannot figure this out for the life of me. I've got a combo box on my form called cboTitleCurrent. I set it's properties when the form opens as follows: With cboTitleCurrent ...
3
by: kirk | last post by:
I have a form with a PictureBox control on it. The .Image property is set to a PNG file(which shows the picture of the US map) with some transparency in it. The .BackColor property is set to...
0
by: Bernadette Vandaele | last post by:
Hi, I am changing the background color of a combo box in a continuous form in Access 2007 with vba (... .backcolor = ...) from grey to white, but it doesn't work for all the lines in the...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.