Why is MS Access coloring all my text fields grey?
March 2, 2006 12:35 AM   Subscribe

Working on an MS Access 2000 record-browsing form; the text fields all display as dark grey text on light grey background, no matter what colors or transparency are specified in the design. I've never seen this before. I've been running in circles for 2 hours. What am I missing?
posted by Tubes to Computers & Internet (12 answers total)
 
Response by poster: Wait, it just got weirder. If I flip to another application, then back to Access, the fields appear white/transparent as intended -- until I browse to the next record, then they all go grey again... except for a couple of fields that stay white and have the exact same design settings as all the others.
posted by Tubes at 12:54 AM on March 2, 2006


Can you still edit the data in these fields?

Without taking a look at the form / control design it's going to be pretty difficult to offer any detailed suggestions. Perhaps you could strip out everything from the .mdb whilst retaining the problem and post it somewhere where we can take a look at it?
posted by hmca at 3:15 AM on March 2, 2006


I'm thinking maybe Access thinks the fields are connected to something write-protected.

On preview: what hmca said.
posted by flabdablet at 3:17 AM on March 2, 2006


My only suggestion was going to be that it is read-only, just like the other two folks. That is the standard colour-scheme for read-only text in Windows apps in general, so it's a pretty good chance that this is what's happening here.
posted by antifuse at 3:21 AM on March 2, 2006


Try Utter Access Forums. Better place for this than AskMeFi. Those boards once got me a 20% raise. They thought I was a genius.
posted by Ironmouth at 8:21 AM on March 2, 2006


Click on one of the problem text boxes in design view and open the properties window for that box.

What are the settings on the Format tab of the Properties? How about on the data tab? Are there any events or macros associated with them?
posted by jasper411 at 9:05 AM on March 2, 2006


It may be a event macro attached to the form itself that sets the format properties for all fields when opened. Take a look at any OnLoad, OnCurrent, OnActivate, OnOpen, or OnGotFocus events for the form. Also check the events for the individual text boxes as jasper411 said.
posted by junesix at 11:51 AM on March 2, 2006


Response by poster: Thanks for all the input. Y'all may be onto something. We needed a read-only record-browsing form, so my quick-n-dirty solution was to make a copy of a record-editing form and make all the text entry fields inactive. So it would make sense that it's a "default grey for read-only fields" thing that's happening. But the couple of fields that remain white are puzzling, as they have the same settings as everything else.

Maybe I should be taking a different approach, setting up user groups and permissions to protect the data in the original form. (Ugh - I don't have much experience with that. Maybe Ironmouth's genius forum will have some tips...!)
posted by Tubes at 12:02 PM on March 2, 2006


Best answer: Depending on the way your form works, you may want to experiment with combinations of the Recordset Type (Snapshot) and Allow Edits/Deletions/Additions options for the form. These will allow you to specify what can be done to the data behind the form without having to touch the controls themselves.

Disabling fields across an entire form is a poor way of creating a read-only form because it breaks macro functionality that tries to set focus or move to controls. It's also easy to forget to disable certain controls and makes the event code horribly bloated should you want to enable some or all of them for some reason.
posted by junesix at 6:55 PM on March 2, 2006


Response by poster: Aha! Yes, the Allow Edits/Deletions/Additions options in the form properties sheet does what I need!

Make all the text entry fields Inactive was barking up the wrong tree; I finally realized I should have been setting them as Locked... but simply setting the form to disallow edits is much better.
posted by Tubes at 10:18 PM on March 2, 2006


So, did the couple of fields that stay white... have the exact same design settings as all the others?
posted by hmca at 8:30 AM on March 3, 2006


Response by poster: Well, they had the same appearance settings, but as it turns out, different data settings.
posted by Tubes at 2:43 PM on March 3, 2006


« Older Am I using the wrong power adapter?   |   How do I remove scratches from stainless steel? Newer »
This thread is closed to new comments.