You could just press the Esc key to undo the new record, and train your
users to do the same.
"Julie" <(E-Mail Removed)> wrote in message
news:8F975410-6B0E-48CC-BED4-(E-Mail Removed)...
> I have a form which I've set to check for null values in 3 controls.
Here's
> how I've started the code:
> ******
> Private Sub Form_BeforeUpdate(Cancel As Integer)
>
> If IsNull(cmbTechID) Or _
> IsNull(cmbWorkloadDateScreened) Or _
> IsNull(txtWorkloadHoursScreened) Then
> ******
> What I want it to do next is give a messagebox that alerts the user and
> gives them the choice of going back and entering values in those three
> controls or cancel the new record so they can exit the form. At first I
was
> using the ***IsNull(control) Then MsgBox "Enter data" **** but then it
won't
> let me close the form without entering something into those controls (it's
> very persistent :P ), which creates an unnecessary record. I think I need
> some kind of undo something on dirty maybe? I don't know. Thanks in
advance
> for the help.
> Julie
>
>
|