Try this code:
Code:
Private Sub cboCustomerID_NotInList(NewData As String, Response As Integer)
On Error GoTo MyErrorHandler
'-- We may need to add another Customer
If MsgBox("[" & NewData & "] is not yet a Customer..." & vbCr & vbCr & _
"Would you like to add a New Customer to your DataBase?", vbYesNo) = vbYes Then
'-- Open the "Add a new Customer" form.
DoCmd.OpenForm "frmNewCustomer", , , , , acDialog, NewData
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
Exit_cboCustomerID_NotInList:
On Error Resume Next
Exit Sub
MyErrorHandler:
MsgBox Err.Number & " : " & Err.Description
Resume Exit_cboCustomerID_NotInList
End Sub
If you get this running properly we can add code to the frmNewCustomer that puts the passed OpenArgs in the right control automatically.