Hi, I'm trying to prevent a user from picking a status if there is no end date.
I'm thinking that if i undo what they pick and go to the end date field they could enter a end date.
It would be nice if i could create a message box to tell them that they have made an error aswell.
I have the following code but it dos not work.
-------------------------------------------------------------------------
Private Sub CS_Status_BeforeUpdate(Cancel As Integer)
If SC_EndDate Is Null Then
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
Me!SC_EndDate.SetFocus
Else
End If
End Sub
--------------------------------------------------------------------------
Can anyone help?
Regards
Pete
I'm thinking that if i undo what they pick and go to the end date field they could enter a end date.
It would be nice if i could create a message box to tell them that they have made an error aswell.
I have the following code but it dos not work.
-------------------------------------------------------------------------
Private Sub CS_Status_BeforeUpdate(Cancel As Integer)
If SC_EndDate Is Null Then
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
Me!SC_EndDate.SetFocus
Else
End If
End Sub
--------------------------------------------------------------------------
Can anyone help?
Regards
Pete