G
Guest
Good morning,
Could someone please help me with why the following If Statement is not
working?
Private Sub HourmeterStart_BeforeUpdate(Cancel As Integer)
If Me.HourmeterStart < Me.MaxHMR AND Me.HasMeter = True Then
MsgBox "This hourmeter is less than the last hourmeter!" & Chr(10) & Please
verify meter reading.", vbOkOnly, "Stop!"
Cancel = True
Me.HourmeterStart.Undo
End If
End Sub
*************************
Even if the current meter being entered is greater than the last meter
reading we get the MsgBox error. I've checked all tables, queries involved
and there are no previous readings that are higher than the current & yet we
still get the message. Is there something missing from my code?
Any help would be greatly appreciated.
Thanks
Could someone please help me with why the following If Statement is not
working?
Private Sub HourmeterStart_BeforeUpdate(Cancel As Integer)
If Me.HourmeterStart < Me.MaxHMR AND Me.HasMeter = True Then
MsgBox "This hourmeter is less than the last hourmeter!" & Chr(10) & Please
verify meter reading.", vbOkOnly, "Stop!"
Cancel = True
Me.HourmeterStart.Undo
End If
End Sub
*************************
Even if the current meter being entered is greater than the last meter
reading we get the MsgBox error. I've checked all tables, queries involved
and there are no previous readings that are higher than the current & yet we
still get the message. Is there something missing from my code?
Any help would be greatly appreciated.
Thanks