Conditional Formatting

R

Ryan

Hello,

I have been having some difficulty with some conditional formatting
that I have been applying to a form that I am working on. I have
built a database at a manufacturing facility which stores quality
testing results and allows people to retrieve those results easily. I
am trying to set up the forms where the operators enter their results
to have conditional formatting so it turns red if the measurement is
out of spec. On the surface this sounds easy. However, we run over
20 different products each of which have different specs. I have a
subroutine that is called Enable that I run form.oncurrent and
afterupdate on a number of controls and once they all have valid data,
I enable the rest of the controls as appropriate. (once again based
on different products, etc.) From this subroutine, I call my
"SetFormats" subroutine (after all the other controls are enabled).
The issue I have seen is that when I go to the next record it appears
that the conditional formats are still based on the product
information from the previous record. I have a button (temporarily)
on the form that allows me to run the SetFormats subroutine at any
point. When I click the button it all works well. It appears that I
am applying the conditional formatting before the new records data is
on the form. I grabbed my Access cheater book and find that On
Current "Runs the specified macro, or Visual Basic event procedure in
a bound form when the focus moves from one record to another but
BEFORE Access displays the new record." Is this my issue, and if so,
where do I need to call my SetFormats sub? Or is it not that simple?

Can anyone help me?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top