I am trying to pass a new description into the Products form. So the users no not need to type the description twice. The user then also adds a category. It works when I am not trying to pass the value. I think the problem is that the new entry is not saved in the text box.
Private Sub Description_NotInList(NewData As String, Response As Integer)
Dim MsgAnsr As Variant
Dim strNewDescription As String
Response = acDataErrContinue
MsgAnsr = MsgBox("Do you want to add this new product?", vbYesNo)
If MsgAnsr = vbNo Then
Me.Description.SetFocus
Me.Description = ""
Else
strNewDescription = Me.Description.Value
DoCmd.OpenForm"dbo_ProductsVW" , , , "[strNewDescription]=" & [Me.PDescription], acFormAdd, acDialog
Response = acDataErrAdded
End If
End Sub
Private Sub Description_NotInList(NewData As String, Response As Integer)
Dim MsgAnsr As Variant
Dim strNewDescription As String
Response = acDataErrContinue
MsgAnsr = MsgBox("Do you want to add this new product?", vbYesNo)
If MsgAnsr = vbNo Then
Me.Description.SetFocus
Me.Description = ""
Else
Response = acDataErrAdded
End If
End Sub