B
Bobby_II
I'm having a problem with the "NotInList" coding. I have a combo box that
lists "Department Contacts", but when I try to input a new contact, I get a
"Run Time Error 2113...Value entered isn't valid for the field". I'm using
Access 2003 and here is my code.
Thanks for any help I can get.....
Private Sub Contacts_NotInList(NewData As String, Response As Integer)
Dim intSelect As Integer
Dim strTitle As String
Dim strMsg As String
Dim intMsgSettings As Integer
Dim strEntry As String
strTitle = "Not in List"
strMsg = "This item is new. Do you want to add it to the list?"
intMsgSettings = vbYesNo + vbQuestion + vbDefaultButton1
intSelect = MsgBox(strMsg, intMsgSettings, strTitle)
If intSelect = vbYes Then
DoCmd.OpenForm "f_DeptContact", , , , acFormAdd, acDialog
Response = acDataErrAdded
Me![Contacts] = NewData
Else
Me![Contacts] = Null
End If
End Sub
lists "Department Contacts", but when I try to input a new contact, I get a
"Run Time Error 2113...Value entered isn't valid for the field". I'm using
Access 2003 and here is my code.
Thanks for any help I can get.....
Private Sub Contacts_NotInList(NewData As String, Response As Integer)
Dim intSelect As Integer
Dim strTitle As String
Dim strMsg As String
Dim intMsgSettings As Integer
Dim strEntry As String
strTitle = "Not in List"
strMsg = "This item is new. Do you want to add it to the list?"
intMsgSettings = vbYesNo + vbQuestion + vbDefaultButton1
intSelect = MsgBox(strMsg, intMsgSettings, strTitle)
If intSelect = vbYes Then
DoCmd.OpenForm "f_DeptContact", , , , acFormAdd, acDialog
Response = acDataErrAdded
Me![Contacts] = NewData
Else
Me![Contacts] = Null
End If
End Sub