|
|
| Next: Database For Personal Finance |
| Author |
Message |
Bob Barnes External

Since: Mar 15, 2006 Posts: 201
|
Posted: Wed Oct 28, 2009 5:00 pm Post subject: Error 3314 Archived from groups: microsoft>public>access (more info?) |
|
|
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 |
|
| Back to top |
|
 |
Tom van Stiphout External

Since: Jan 09, 2009 Posts: 45
|
Posted: Wed Oct 28, 2009 7:54 pm Post subject: Re: Error 3314 [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Wed, 28 Oct 2009 17:00:01 -0700, Bob Barnes
<BobBarnes.DeleteThis@discussions.microsoft.com> wrote:
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
>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 |
|
| Back to top |
|
 |
Bob Barnes External

Since: Mar 15, 2006 Posts: 201
|
Posted: Thu Oct 29, 2009 8:30 am Post subject: Re: Error 3314 [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
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
"Tom van Stiphout" wrote:
> On Wed, 28 Oct 2009 17:00:01 -0700, Bob Barnes
> <BobBarnes.DeleteThis@discussions.microsoft.com> wrote:
>
> 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
>
> >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
> .
> |
|
| Back to top |
|
 |
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
| |
|
|