H-SC
asked on
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
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
what do you mean "Difference on the changes"?
Mike
Mike
ASKER
the changes that I make to the records on the for that opens up on click from the main form
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
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
ASKER
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
It does not show those changes
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
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
I would use the CLose event of the editing form ...
Private Sub Form_Close()
Forms("MyForm").Controls(" MyComboCon trol").Req uery
End Sub
Steve
Private Sub Form_Close()
Forms("MyForm").Controls("
End Sub
Steve
ASKER
Data-Man,
I must have been doing something wrong. Your suggestion ..... Me.cboComboBoxName.Requery worked great !!!
Thanks Again
I must have been doing something wrong. Your suggestion ..... Me.cboComboBoxName.Requery
Thanks Again
ASKER
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.