Incremental Readings Question

  • Thread starter Thread starter Solomon Wilde
  • Start date Start date
S

Solomon Wilde

I am setting up an Access 2000 database where meter readings are
recorded in a table (tblReading). I want each reading entered for any
particular meter to have to be larger tha n (or equal to) the
previous reading. My patchy knowledge of Access tells me I could write
some vba for the AfterUpdate event for the txtReading text box but is
there a better way of doing this? Could I use a CHECK constaint or
something else?

Any help greatly appreciated.
 
Your "patchy knowledge" is pretty close.
The BeforeUpdate event is actually better for validations, because it has a
Cancel parameter, which lets you cancel the update if your validation
doesn't succeed.
You might want to look at the DMax() function to find the largest reading
entered thus far.

A couple of functional questions occur to me:
Don't your meters ever "roll over" and start at 0 again?
What sort of a data feed do you have?
If there's any manual copying of data, there's always a chance for
mistakes, making no good data available. (The mistake could be made before
the data gets to the data entry person.) What should the data entry person
do when confronted with invalid data?

HTH
- Turtle
 
Back
Top