J
John T
I posted this yesterday and got a great answer, however,
I missed something when I posted. Here is what I postred
along with the response:
Response
The DoCmd.Save is accomplishing nothing for you. Replace
it with...
Me.Dirty = False
Forms!NameOfFirstForm!NameOfComboBox.Requery
This works great. The problem is I have more than one
form that will do this. Form 1 and form 2 both have the
color combo box and the Add Color button. I tried adding
the code for both forms but I get an error message saying
Access can't find the other form. For instance when I go
to the Add Color form from form 1, form 2 is closed and I
get the error message because form 2 is closed.
Is there a way to solve this.
Thanks for all the help.
John T.
I missed something when I posted. Here is what I postred
along with the response:
I have a form with a combo box called Color. I also have
a button next to it called Add Color. If a color is not
in the combo box, I press the Add Color button and it
takes me to the Add Color form. When I finish adding the
new color I have a button called Done. When I press that
it closes the Add Color form and returns me to the
original form. The Done button has an event programmed
for the On Click event that does a save (DoCmd.Save). The
problem I have is when I return to the original form, the
new colors aren't there. I have to close the form and
open it again to get the new colors to appear. Is there a
way to have this combo box update so the new colors
appear without having to close and open the form?
Response
The DoCmd.Save is accomplishing nothing for you. Replace
it with...
Me.Dirty = False
Forms!NameOfFirstForm!NameOfComboBox.Requery
This works great. The problem is I have more than one
form that will do this. Form 1 and form 2 both have the
color combo box and the Add Color button. I tried adding
the code for both forms but I get an error message saying
Access can't find the other form. For instance when I go
to the Add Color form from form 1, form 2 is closed and I
get the error message because form 2 is closed.
Is there a way to solve this.
Thanks for all the help.
John T.