format current record

  • Thread starter Thread starter Ivor Williams
  • Start date Start date
I

Ivor Williams

I have a form with a subform. The subform is a continuous form. On the
subform are two fields in which quantities are entered. If the quantities
are the same, I want the ForeColor to be black. If they aren't equal, I want
the ForeColor to be red. I've used the following VBA code to try to
accomplish this:

Private Sub ToSiteQty_AfterUpdate()
If ToSiteQty <> Qty Then ToSiteQty.ForeColor = 255 Else
ToSiteQty.ForeColor = -2147483640
End Sub

This works fine except the ForeColor in ALL the records changes, not just
the current record. Is there a way around this?

Ivor
 

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

Back
Top