Conditional formatting

  • Thread starter Thread starter Norbert Meiss
  • Start date Start date
N

Norbert Meiss

I use an continuous form with a conditionally formatted text field. The text
in the field depends on the value of another field in the same record. When I
update this other field, the text changes as expected. However the text color
only changes to the corresponding condition when I move to another record
with the mouse, not when I use the tab or enter key.
What do I miss?
TIA,
Norbert Meiss
 
Norbert,
Even though you enter (or change) a value on a record, those changes are
not wriiten to the table until an Update or Refresh or Requery occurs.
Moving from one record to another "forces" an Update.
In your case, try a Refresh on the AfterUpdate event of your field.
That should cause an Update while still on the same record, and allow the
C/F to kick in.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
Al,
I should have mentioned that there is only one updateable field in each
record. So in both cases (either clicking into another line or using the tab
or enter key) saves the record. I already tried a refresh on the
conditionally formatted field. That doesn't work either...

But finally I found out, that a "DoCmd.Requery" in the AfterUpdate does the
trick.

Thanks, Norbert
 
Norbert,
Yes, I should have included Requery as a possible solution, particularly
when dealing with subforms, lists, or combo boxes..
Thought I'd suggest Refresh first...
Good deal.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
Back
Top