Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access Forms Coding > Customise DataE...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 41559 of 43413
Post > Topic >>

Customise DataErr 2169 Msg Box

by "Danielle-Taylor" <u45352@[EMAIL PROTECTED] > Aug 8, 2008 at 11:56 AM

Hello,

I have searched and search all day to find an answer to my query.

I am using MS Access to create a simple database. I have a data entry form
which has some required fields (set in table design). If the user doesn't
fill in the required fields and tries to close the form the first dataerr
is
3314 which give isn't very user friendly, then this is followed by dataerr
2169 which asks the user if they want to close the form, if they say yes
it
will close and the record will not be saved, if they say yes it returns
back
to the form.

My aim is to not display the dataerr 3314 which I have achieved. But I
want
to customise dataerr 2169 to say 'There are required fields empty. If you
close the form your record will not be saved. Would you like to close this
form?'

I am struggling on how to code the 'No' answer so it cancels closing the
form
and returns to the form like dataerr 2169 would do? Any help would be much
appreciated!

Private Sub Form_Error(DataErr As Integer, Response As Integer)
    Select Case DataErr
        Case 3314
        Response = acDataErrContinue
    
Case 2169
    Response = acDataErrContinue
     If MsgBox ("'There are required fields empty. If you close the form
your
record will not be saved.   Would you like to close this form?", vbYesNo)
=
vbNo Then
 
      'Require code to cancel the close form operation
      End If

Case Else
    Response = acDataErrDisplay
End Select


End Sub
 




 1 Posts in Topic:
Customise DataErr 2169 Msg Box
"Danielle-Taylor&quo  2008-08-08 11:56:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 20:56:36 CST 2008.