Unanswered: Adding new data and returning to form that doesn't update.
I USE THE NOTINLIST TO GO TO A SECOND FORM. I GET EVERYTHING ENTERED, THEN WHEN IT TAKES ME BACK TO THE ORIGINAL FORM, IT SAYS THE DATA IS NOT THERE.
CODE IS BELOW.
Private Sub BillToID_NotInList(NewData As String, Response As Integer)
Response = acDataErrContinue
If MsgBox("The Company " & NewData & " you entered, does not exist yet." & vbCrLf & vbCrLf & "Do You wish to add it?", vbQuestion + vbYesNo) = vbYes Then
DoCmd.OpenForm "FrmEnterCompany", acNormal, , , acFormAdd, , NewData
Response = acDataErrAdded
When you open the second form, make sure to open it as a Dialog. In the sixth parameter, WindowMode, set it to acDialog. When you open a form as a dialog, the user is only allowed to work in the opened form until it is closed. The other nice thing is when you open the form, the code that called the form is suspended until the second form is closed. So if you put something like :