daniels012
Technical User
Is there any way I can do this code without putting the form in Dialog when it opens??? Everytime Im in Dialog mode my computer freezes (Any computer/ work,home, my laptop)??
Please any help? I can send the file if needed.
Private Sub ProductID_NotInList(NewData As String, Response As Integer)
If MsgBox("The Product " & NewData & " you entered, does not exist yet." & vbCrLf & vbCrLf & "Do you wish to add it?", _
vbQuestion + vbYesNo) = vbYes Then
DoCmd.OpenForm "AddNewProductsFrm", acNormal, , , acFormAdd, acDialog, NewData
Me.ProductID.RowSource = Me.ProductID.RowSource
Response = acDataErrContinue
Else
Response = acDataErrAdded
ProductID.Undo
DoCmd.Save
ProductID.Requery
End If
End Sub
Thank You,
Michael
Please any help? I can send the file if needed.
Private Sub ProductID_NotInList(NewData As String, Response As Integer)
If MsgBox("The Product " & NewData & " you entered, does not exist yet." & vbCrLf & vbCrLf & "Do you wish to add it?", _
vbQuestion + vbYesNo) = vbYes Then
DoCmd.OpenForm "AddNewProductsFrm", acNormal, , , acFormAdd, acDialog, NewData
Me.ProductID.RowSource = Me.ProductID.RowSource
Response = acDataErrContinue
Else
Response = acDataErrAdded
ProductID.Undo
DoCmd.Save
ProductID.Requery
End If
End Sub
Thank You,
Michael