update a text field

  • Thread starter Thread starter David
  • Start date Start date
D

David

I have a continuous form with the following fields:

UnitNo
ServiceStatus (should return "Due" or "")
CurrentMeter (meter reading entered by user)
LastServicedMeter (meter reading last serviced)
Frequency (static value - when to service)

I want to update the field [ServiceStatus] to read "DUE"
or "" depending on the following:
If ([CurrentMeter]-[LastServicedMeter])>[Frequency],"DUE"
Else ""

I've tried [ServiceStatus] as both bound and unbound and
have tried an "IF-Then" statement at various events, but
have not succeeded in updating this field.
Any suggestion are appreciated!!
 
You won't believe how close you are!!!

Base your form on a query and put the following expression in an empty field in
the query:

ServiceStatus:IIf(([CurrentMeter]-[LastServicedMeter])>[Frequency],"DUE","")
 
Back
Top