J
JC
I am using the notinlist event to add records to a parts
table. The code is below. My question is what if the
user decides AFTER he gets into frmMiniParts form that he
does not want to add the record - how do I get that
information back to the notinlist subprocedure and set
Response to acDataErrContinue?
Thank you.
Private Sub PartNum_NotInList(NewData As String, Response
As Integer)
Dim i As Integer
Dim Msg As String
If NewData = "" Then Exit Sub
Msg = "'" & NewData & "' is not currently in the list."
& vbCr & vbCr & "Do you want to add it?"
i = MsgBox(Msg, vbQuestion + vbYesNo, NewData)
If i = vbYes Then
DoCmd.OpenForm "frmMiniParts", , , , acFormAdd,
acDialog, NewData
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
End Sub
table. The code is below. My question is what if the
user decides AFTER he gets into frmMiniParts form that he
does not want to add the record - how do I get that
information back to the notinlist subprocedure and set
Response to acDataErrContinue?
Thank you.
Private Sub PartNum_NotInList(NewData As String, Response
As Integer)
Dim i As Integer
Dim Msg As String
If NewData = "" Then Exit Sub
Msg = "'" & NewData & "' is not currently in the list."
& vbCr & vbCr & "Do you want to add it?"
i = MsgBox(Msg, vbQuestion + vbYesNo, NewData)
If i = vbYes Then
DoCmd.OpenForm "frmMiniParts", , , , acFormAdd,
acDialog, NewData
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
End Sub