Also it kinds of defeats the purpose of CF to modify it on every Current
event.
Marshall due to a bug in CF you have to setup the FormatConditions
object programmatically in order to ensure that the background TextBox
control's Enabled property setting will be respected. Sample code here:
http://www.lebans.com/conditionalformatting.htm
Just my $.02
--
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Marshall Barton" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Phil wrote:
>
> >Does anyone know how to tchange the color of all fields
> >in on row of a form?
> >
> >Using the code below in the CurrentRecord of the form, I
> >can get a single field's Unique value to turn yellow, but
> >I also need the entrie row to turn yellow. The fields in
> >the rest on the row may not be Unique.
> >
> >Private Sub Form_Current()
> >
> > Dim fcd As FormatCondition
> >
> > With Form_frmTransactions_SGH.CCN
> > With .FormatConditions
> > .Delete
> > Set fcd = .Add(acFieldValue, acEqual, "'" &
> >Form_frmTransactions_SGH.CCN & "'")
> > fcd.BackColor = vbYellow
> > End With
> > End With
> >
> >End Sub
>
> Sorry but I don't recognize what you're doing there. It
> sort of looks like you're manipulating the format conditions
> of a control, but I can't figure out why. Maybe you just
> got started down a twisty path? or maybe I don't understand
> what you're trying to do.
>
> To make the entire detail section of a form display a
> conditional background color, first make all of the
> section's controls BackStyle Transparent. Then add a
> rectangle control the same height and width as the entire
> section, use the Formst Send to Back menu item to place it
> behind all the other controls. Now you can use Conditional
> Formatting on the one rectangle control to control the color
> of the entire section.
>
> --
> Marsh
> MVP [MS Access]