Error 3314

B

Bob Barnes

Have an Unbound Form w/ a ListBox and several Dropdowns w/ SQL Statements.

Getting, sometimes..when Clicking one of 2 Buttons. I have Error Traps w/
"Stop" on all possible Controls affected by Clicking the "offending" Buttons.

Error 3314: The field 'Mcns.McnID' cannot contain a Null value because the
Required property for this field is set to True. Enter a value in this field.

Had read in archive Posts that code like this should trap and "gracefully
exit" the Error...(but it hasn't)..

Private Sub Form_Error(DataErr As Integer, Response As Integer)
Select Case DataErr
Case 3314
On Error Resume Next
Case Else
MsgBox "The form error, " & DataErr & " has occurred.", vbOKOnly, "Error"
End Select

Any Tips? TIA - Bob
 
T

Tom van Stiphout

On Wed, 28 Oct 2009 17:00:01 -0700, Bob Barnes

The Form_Error event is for *bound* forms only. Set a breakpoint
there; I would think it will never hit.

For unbound forms the code in your button events is probably more
relevant to post.

-Tom.
Microsoft Access MVP
 
B

Bob Barnes

Thank you.

I examined all Procedures Called from Clicking the "offending Buttons"..they
have code like (BELOW)..but the "Stop" doesn't.

This only occurs infrequently, and clicking "OK" keeps things going..BUT I
need to figure out how to keep that "Error MsgBox" from occurring.

Private Sub Setup_To_Add_New_Data()
On Error GoTo AAA1
TotPartsRecs = TotPartsRecs + 1
CurRecs = TotPartsRecs & "/" & TotPartsRecs
'Set Ctrls
Controls_UnLock_And_Enable
AAA2:
Screen.MousePointer = 1: Exit Sub
AAA1:
Stop
Select Case Err
Case Else
MsgBox "Error Number " & Err.Number & " " & Err.Description
Resume AAA2
End Select
End Sub
 

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

Top