Not in list warning

C

CJ

Hi Groupies

I have used Docmd Setwarnings False many times before but this time
I seem to need some assistance.

My field is a combo box.
Limit to list is Yes. (bound integer 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 throughout
the code but to no avail.
I have no other code running off of this field.

Any ideas? What am I missing?
 

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

Similar Threads

Not in list warning 2
Not In List 2 values 5
Not in list requery issue 4
NotInList not firing ? 1
Not In List help needed 1
Help With Code Please 5
Not in list not working 1
Combo Box Adding to List--Error 91 2

Top