L
lmv
I hope someone can tell me why I get the additional "not in list error" and
how to surpress it. As my form after I have said yes, my form opens but then
the system error pops up... THANKS!
Private Sub cboPurchaser_NotInList(NewData As String, Response As Integer)
On Error GoTo cboPurchaser_NotInList_Err
Dim intAnswer As Integer
Dim stDocName As String
intAnswer = MsgBox("The NAME " & Chr(34) & NewData & _
Chr(34) & " is not currently listed." & vbCrLf & _
"Would you like to add it to the list now?" _
, vbQuestion + vbYesNo, "BC")
If intAnswer = vbYes Then
stDocName = "frmPurchaser"
DoCmd.OpenForm stDocName
DoCmd.GoToRecord , , acNewRec
Response = acDataErrAdded
Else
MsgBox "Please choose a name from the list." _
, vbInformation, "BC"
Response = acDataErrContinue
End If
cboPurchaser_NotInList_Exit:
Exit Sub
cboPurchaser_NotInList_Err:
MsgBox err.Description, vbCritical, "Error"
Resume cboPurchaser_NotInList_Exit
End Sub
how to surpress it. As my form after I have said yes, my form opens but then
the system error pops up... THANKS!
Private Sub cboPurchaser_NotInList(NewData As String, Response As Integer)
On Error GoTo cboPurchaser_NotInList_Err
Dim intAnswer As Integer
Dim stDocName As String
intAnswer = MsgBox("The NAME " & Chr(34) & NewData & _
Chr(34) & " is not currently listed." & vbCrLf & _
"Would you like to add it to the list now?" _
, vbQuestion + vbYesNo, "BC")
If intAnswer = vbYes Then
stDocName = "frmPurchaser"
DoCmd.OpenForm stDocName
DoCmd.GoToRecord , , acNewRec
Response = acDataErrAdded
Else
MsgBox "Please choose a name from the list." _
, vbInformation, "BC"
Response = acDataErrContinue
End If
cboPurchaser_NotInList_Exit:
Exit Sub
cboPurchaser_NotInList_Err:
MsgBox err.Description, vbCritical, "Error"
Resume cboPurchaser_NotInList_Exit
End Sub