Conditional formatting of a record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All,

Keeping it simple. I have a continuous form. I want to make the record that
has condition X blue, and the record that has condition y green. How do I do
that?

Thanks

Joe
 
if you're using A2000 or newer, open your form in design view, select a
control, and look at the Conditional Formatting option on the Format menu.

hth
 
Tina,
Thanks for the response.

I need the entire record to be formatted, this includes all the controls and
the backround, based on the contents of a field.

Thanks
Joe
 
if you want the entire record to be one background color, the easy way might
be to add a Rectangle control to the form's Detail section, sized to exactly
fit the section. click Send to Back on the Format menu, to put the control
behind all the other controls. set the BackStyle property of all the other
controls to Transparent. set Conditional formatting on the Rectangle control
as desired.

hth
 
Tina,

I tried what you suggested but it changed the rectangle to the chosen color
for the entire form. I need for it to be a different color for each record on
a continous form base on some condition. Thus condition x will be blue on the
continous form, condition y would be blue. On my form I should see several
blues and several reds.

Thanks for your help.

Joe
 
sorry, my bad - i didn't check out the Rectangle control before posting.
conditional formatting is not available on that control type. i'm afraid
your only option is to set conditional formatting on each control in your
form, so they all turn color as desired. you can't set conditional
formatting on the Detail section itself, or on control labels, so the best
you can do is to put all the controls tight against each other (as though
you were simulating a datasheet view) and put the labels in the Header
section.

hth
 
Use a TextBox control instead of the Rectangle control. For sample code see:
http://www.lebans.com/conditionalformatting.htm
A2K or Higher Only!

New Feb 08,2002. Added support for Datasheet view and SubForms.

A2KConditionalFormatting.zip is a sample MDB demonstrating how to
programmatically setup Conditional Formatting to simulate:

1) Highlighting of the Current Row for a Form in Continuous or Datasheet
View

2) Highlighting of Alternate Rows for a Form in Continuous or Datasheet View

Version 2.7

Added sample demonstrating how to achieve a background Hover/Highlighting of
rows for a form in Continuous view.

Version 2.3

Added sample demonstrating how to achieve pseudo enable/disable of an
unbound control on a form in Continuous View.

Version 1.9

Added sample form to show how to apply conditional formatting to based on a
Boolean(Yes/No) field.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Use a TextBox control instead of the Rectangle control.

of course, how simple! (duh, tina) i need to step outside the box,
literally! <g>
thanks, Stephen! :)
 
Back
Top