Refresh Dropdown

I have a form that has a common dropdown .  Next to the dropdown I have a button that opens another form that has the values for the dropdown.  I would like for the user to be able to click on the button and modify the values and close the form and the new values show up on the dropdown.  Keep in mind that I am using the same form that these values are stored in on other forms.  so the requery dropdown has to be universal to other forms.  I hope that this makes some sense.

Thanks
LVL 1
H-SCAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Data-ManCOOCommented:
In the activate event of the form with the combo box put this code

Me.cboComboBoxName.Requery


When ever this form receives the focus it will requery the combo box

Mike
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
H-SCAuthor Commented:
Mike,

Thanks for the response.  I tried Me.cboComboBoxName.Requery
and does not give me errors but also does not make any difference on the changes.
0
Data-ManCOOCommented:
what do you mean "Difference on the changes"?

Mike
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

H-SCAuthor Commented:
the changes that I make to the records on the for that opens up on click from the main form
0
Data-ManCOOCommented:
If the form that opens is based on the same table that the combo box is using they can't be different.

Let's make sure that we are on the same sheet of music.

You have a combo box on a form.  You click a button that opens a form and displays all the items in the combo box..so they can be edited correct?  

When you close the form, the combo box show's the changes made via the form correct?

Where is the problem?

Mike
0
H-SCAuthor Commented:
This is the problem .....When you close the form, the combo box show's the changes made via the form

It does not show those changes
0
Data-ManCOOCommented:
In the Activate event for the form with the combo box do this

Me.cboComboBoxName.Requery

If there are records in the underlying table added via the other form, this line of code will cause them to show up.

Sorry I sound like a broken record, but that is what the Requery does...gets the new records.

Mike
0
stevbeCommented:
I would use the CLose event of the editing form ...

Private Sub Form_Close()
   Forms("MyForm").Controls("MyComboControl").Requery
End Sub

Steve
0
H-SCAuthor Commented:
Data-Man,

I must have been doing something wrong.  Your suggestion .....  Me.cboComboBoxName.Requery worked great !!!


Thanks Again
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.