color of field in each record of datasheet depends on other field

W

WDSnews

The subform has a field called [Asset ID] whose color should depend on the
value of [New Asset], in the same record. By default, [New Asset] is True
and [Asset ID] should be Yellow. When [New Asset] becomes False, [Asset ID]
should become White. The purpose is to reveal which Asset IDs already exist
in a particular table, and which Asset IDs will be newly added.

I want to use datasheet view in my subform because it provides a tight
arrangement with headers that scroll and scale with the fields below them.
If continuous forms can be made to do this, then I'm willing to use
continuous forms view, and use the trick where a textbox with conditional
formatting underlays a transparent field.

I appreciate your genious!
 
J

John Spencer

Use conditional formatting.

On the Asset ID control, apply conditional formatting using the Expression is
option.

Expression Is [New Asset] = True

And choose Yellow for the background or for the color of the font.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top