5 pts.
 Conditional Format – Access 97
Unfortunately, the company I work for uses Access 97, and the Conditional Format Wizard is not available in this version. Can you help me with building a macro/expression to create a conditional format for a form? I need to format the form's background color based simply on whether the record is "Active" vs. "Inactive." Thanks, Alayne

Software/Hardware used:
ASKED: October 29, 2008  6:07 PM
UPDATED: October 30, 2008  3:49 PM

Answer Wiki:
In the form's on current trigger, simply check the Active / inactive field and set the background property of the detail section accordingly. You can do it in a Macro or VBA code. I put a VBA code example below. Private Sub Form_Current() If Me![active] Then ' <active] is a bound field to recordsource Me.Section(0).BackColor = 255 'set detail section to red when active Else Me.Section(0).BackColor = -2147483633 'set detail section to standard gray when not active End If End Sub
Last Wiki Answer Submitted:  October 30, 2008  3:49 pm  by  Randym   1,740 pts.
All Answer Wiki Contributors:  Randym   1,740 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _