Tim Bedborough
Registered User.
- Local time
- Today, 09:08
- Joined
- Nov 16, 2015
- Messages
- 42
Hi all
May just be wrong end of day but can you help with this one please.
I'm trying to make sure that an end user can not enter a value which is either Null or less than the existing value.
This code brings up a message box if null or less than 19500 but rather than specify a number, i.e. 19500 I just want to refer to current field value.
Thanks
Private Sub RPRRef_LostFocus()
If IsNull(Me.RPRRef) Or Me.RPRRef < 19500 Then
MsgBox "The job reference number cannot be left blank or lower than 19500 or a previously allocated number." & vbCrLf & _
"The deleted number will be reinstated.", vbExclamation, "RPR JOB NUMBER"
DoCmd.GoToControl "RPRRef"
DoCmd.RunCommand acCmdUndo
End If
End Sub
May just be wrong end of day but can you help with this one please.
I'm trying to make sure that an end user can not enter a value which is either Null or less than the existing value.
This code brings up a message box if null or less than 19500 but rather than specify a number, i.e. 19500 I just want to refer to current field value.
Thanks
Private Sub RPRRef_LostFocus()
If IsNull(Me.RPRRef) Or Me.RPRRef < 19500 Then
MsgBox "The job reference number cannot be left blank or lower than 19500 or a previously allocated number." & vbCrLf & _
"The deleted number will be reinstated.", vbExclamation, "RPR JOB NUMBER"
DoCmd.GoToControl "RPRRef"
DoCmd.RunCommand acCmdUndo
End If
End Sub