Are you sure? I entered
GrownYrSeason.FormatConditions.Delete
above the code I sent you, and now my code is working.
Thanks for your response!
"Damon Heron" wrote:
[Quoted Text] > If you use acExpression, acNotEqual is ignored. Try removing it and see > what happens. > > Damon > > "Mary Fetsch" <MaryFetsch[ at ]discussions.microsoft.com> wrote in message > news:9FEA4E78-91D5-4FC2-875E-74017ED8F88D[ at ]microsoft.com... > > In Access 2003, I had this code to apply conditional formatting to a > > field: > > > > With GrownYrSeason.FormatConditions _ > > .Add(acExpression, acNotEqual, Nz(GrownYrYear.Value, "") <> > > "XXX") > > .BackColor = RGB(230, 230, 230) > > End With > > > > I recently upgraded to Access 2007, and this code seems to work sometimes, > > and other times I get this message: > > > > Run-time error '7966': > > > > The format condition number you specified is greater than the number > > of format conditions. > > > > I've tried this all different ways with no luck. Any ideas? > > > > Mary Fetsch > > > > > > > > > > >
|