PC Review


Reply
Thread Tools Rate Thread

can't close form after IsNull messagebox...

 
 
=?Utf-8?B?SnVsaWU=?=
Guest
Posts: n/a
 
      22nd Jan 2007
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


 
Reply With Quote
 
 
 
 
Baz
Guest
Posts: n/a
 
      22nd Jan 2007
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
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Close App. with a MessageBox =?Utf-8?B?QUZTU2tpZXI=?= Microsoft Access 8 1st Jun 2007 09:33 PM
Pop up MessageBox and close whole program ahjiang@gmail.com Microsoft C# .NET 2 18th Sep 2006 06:40 PM
how to close messageBox? =?Utf-8?B?cy1nYWxpdA==?= Microsoft Dot NET 2 6th Oct 2004 05:39 PM
how to close messageBox? =?Utf-8?B?cy1nYWxpdA==?= Microsoft Dot NET 2 2nd Oct 2004 04:49 PM
MessageBox close using a different key =?Utf-8?B?SmF4?= Microsoft Dot NET Compact Framework 1 19th Apr 2004 04:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:02 PM.