C
Carl
I have the code to open a form and add a name if the name does not appear in
combo box, but when I close the data input form the combo box does not pick
up the fact that the
name has beeen added.
What am I missing?
Here is what i have:
Private Sub cboLastName_NotInList(NewData As String, Response As Integer)
Dim intReply As Integer
intReply = MsgBox("The teammate's name '" & NewData & _
"' is not in the list. Would you like to add?", vbYesNo)
If intReply = vbYes Then
DoCmd.OpenForm "frmTeammates", , , , acFormAdd, acDialog, NewData
'-- Record added, so cancel Access's default processing
Response = acDataErrAdded
Else
MsgBox "Please select an item in the list."
Response = acDataErrContinue
End If
End Sub
Carl
combo box, but when I close the data input form the combo box does not pick
up the fact that the
name has beeen added.
What am I missing?
Here is what i have:
Private Sub cboLastName_NotInList(NewData As String, Response As Integer)
Dim intReply As Integer
intReply = MsgBox("The teammate's name '" & NewData & _
"' is not in the list. Would you like to add?", vbYesNo)
If intReply = vbYes Then
DoCmd.OpenForm "frmTeammates", , , , acFormAdd, acDialog, NewData
'-- Record added, so cancel Access's default processing
Response = acDataErrAdded
Else
MsgBox "Please select an item in the list."
Response = acDataErrContinue
End If
End Sub
Carl