G
Guest
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 ), 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
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 ), 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