The Private sub TXTcurrentReading needs a slight change. See below
The program now picks up if your value is less than the previous reading
Code:
Private Sub TxtCurrentReading_beforeUpdate(cancel As Integer)
Dim myval As Long
Dim mysql As String
Dim MyPR As Long
DoCmd.SetWarnings False
MyPR = Me.TxtCurrentReading.Value
mysql = "insert into tblreadings (PreviousReading, PumpID) values (" & MyPR & "," & Me.TxtPumpID.Value & ")"
myval = DMax("CurrentReading", "tblReadings", "[pumpID] = " & Me.TxtPumpID.Value)
If myval > Me.TxtCurrentReading Then
MsgBox "Your value is too small compared to other readings and will not be updated", vbCritical
cancel = True
Exit Sub
End If
DoCmd.RunSQL (mysql)
DoCmd.SetWarnings True
End Sub