can't close form after IsNull messagebox...

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 :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
 
B

Baz

You could just press the Esc key to undo the new record, and train your
users to do the same.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top