On Not In List/Open Data Entry Form

K

Kevin Sprinkel

I have two related questions:

1) If a user enters a new job number, the following
procedure opens a data entry form. I'd like the JobNumber
(in txtJobNumber) set to the value of the one entered in
the combo box, but I've been unable to set it using either
the On Activate or On Open Events.

Private Sub cboJobNumber_NotInList(NewData As String,
Response As Integer)
DoCmd.OpenForm "frmProjects", , , , acFormAdd, acDialog
Response = acDataErrAdded
End Sub

2) The 2nd form has Save and Cancel buttons. If the user
presses Cancel, I'm wiping the entered combo box clear
before closing the 2nd form, but it still gives me a
message "Value is not in the list" on returning to the
original form, which I don't want to display; I just want
the user returned to the combo box.

Thanks for all assistance.
Kevin Sprinkel
 
Top