N
Niniel
Hello,
I use a combo box on a form, and I have programmed the Not In List event so
that if th user enters something new, a form will pop up where new
information can be entered.
It works nicely, except ideally, the data that was originally entered into
the combo box would be carried over to the pop-up form so that the user
wouldn't have to type it again.
Does anybody know how to do that?
Also, I noticed that if what I type into the form [ok, the field that
corresponds to the combo box] is not the same as what I had originally
entered into the combo box, then upon saving and closing the form, I get an
error message stating that the content of the combo box is not in the list.
The newly entered data is available, though.
What is a good way to handle this? I thought that maybe wiping the combo box
may work, or would importing back the information from the corresponding
field on the form be better?
How would that have to be done?
Here is what I have so far:
Private Sub LocationID_NotInList(NewData As String, Response As Integer)
' Opens form to enter new location
Dim stDocName As String
stDocName = "frmNewLocation"
DoCmd.OpenForm stDocName, acNormal, , , acFormAdd, acDialog
Response = acDataErrAdded
End Sub
Thank you.
I use a combo box on a form, and I have programmed the Not In List event so
that if th user enters something new, a form will pop up where new
information can be entered.
It works nicely, except ideally, the data that was originally entered into
the combo box would be carried over to the pop-up form so that the user
wouldn't have to type it again.
Does anybody know how to do that?
Also, I noticed that if what I type into the form [ok, the field that
corresponds to the combo box] is not the same as what I had originally
entered into the combo box, then upon saving and closing the form, I get an
error message stating that the content of the combo box is not in the list.
The newly entered data is available, though.
What is a good way to handle this? I thought that maybe wiping the combo box
may work, or would importing back the information from the corresponding
field on the form be better?
How would that have to be done?
Here is what I have so far:
Private Sub LocationID_NotInList(NewData As String, Response As Integer)
' Opens form to enter new location
Dim stDocName As String
stDocName = "frmNewLocation"
DoCmd.OpenForm stDocName, acNormal, , , acFormAdd, acDialog
Response = acDataErrAdded
End Sub
Thank you.