C
CJ
Hi Groupies
I have used Docmd Setwarnings False many times before but this time I need
some assistance.
My field is a combo box.
Limit to list is Yes. (bound field is not visible)
My code without the SetWarnings is as follows:
Private Sub Model_NotInList(NewData As String, Response As Integer)
Dim strMsg As String
strMsg = strMsg & "Add " & NewData & " to the list?"
If MsgBox(strMsg, vbQuestion + vbYesNo, "Item Not Available") = vbNo
Then
Response = acDataErrContinue
Else
Me.Undo
Me.Dirty = False
DoCmd.OpenForm "frmModel"
DoCmd.GoToRecord , , acNewRec
Forms!frmModel!lngMakeID.Value = Forms!frmInventory.Make
Forms!frmModel!strModel.SetFocus
If Err Then
MsgBox "An error occurred. Please try again."
Response = acDataErrContinue
Else
Response = acDataErrAdded
End If
End If
End Sub
I have tried turning off the warnings everywhere but to no avail.
I have no other code running off of this field.
Any ideas?
I have used Docmd Setwarnings False many times before but this time I need
some assistance.
My field is a combo box.
Limit to list is Yes. (bound field is not visible)
My code without the SetWarnings is as follows:
Private Sub Model_NotInList(NewData As String, Response As Integer)
Dim strMsg As String
strMsg = strMsg & "Add " & NewData & " to the list?"
If MsgBox(strMsg, vbQuestion + vbYesNo, "Item Not Available") = vbNo
Then
Response = acDataErrContinue
Else
Me.Undo
Me.Dirty = False
DoCmd.OpenForm "frmModel"
DoCmd.GoToRecord , , acNewRec
Forms!frmModel!lngMakeID.Value = Forms!frmInventory.Make
Forms!frmModel!strModel.SetFocus
If Err Then
MsgBox "An error occurred. Please try again."
Response = acDataErrContinue
Else
Response = acDataErrAdded
End If
End If
End Sub
I have tried turning off the warnings everywhere but to no avail.
I have no other code running off of this field.
Any ideas?