On close form update main form

Local time
Today, 12:55
Joined
Dec 10, 2009
Messages
35
I am not sure if I have worded the title for this thread correctly.

Here's my dilemma, I am pretty sure there's a away around this though, but any advice is greatly appreciated.

I have a form, a series of drop downs to select printer cartridges yea?

I want the user to be able to add print cartridges to the drop down, but on a popup form.

I have the popup form working!

However, when I close the popup form, it doesnt update the drop down of the cartridges, to reflect the new cartridges entered into the popup form.

Is there anyway of making it refresh the data input form when I close it to show the new items added to the list please?

Thanks in advance, would be quite interesting to know how to do this as I could possibly use it for a conditional statement in another area of my database.

Thanks again,
Jeremy.
 
what you need to do is

a) open the popup in dialog form
b) when it closes, and you come back to your main form do a
mycombo.requery - this will reload any new values

c) alternatively put this functionality in (say) a dble-click for the combo box
 
You would need to refer to the control on the form using this syntax (on the unload event of the pop up form):

Forms("FormName")!NameOfComboBox.AddItem "string representing the catridge name"
Forms("FormName")!NameOfComboBox.Requery

Or:
Forms("FormName").Controls("NameOfComboBox").AddItem "string representing the catridge name"
Forms("FormName").Controls("NameOfComboBox").Requery

This applies if the combo box is unbound, and I would imagine in your case it is.
 

Users who are viewing this thread

Back
Top Bottom