update a combobox

crich21

Registered User.
Local time
Today, 10:38
Joined
Jan 10, 2003
Messages
97
I have a combobox based on a query placed on a form. I made the doubleclick open a form to add an item to the list. But when the new item is added it doesn't show up in the list until I close the form and reopen it. Any Ideas. I know I have done this before but am having a brain block.

thanks again

Chad
 
If you have a form open to add a new item, then on the OnClose Event for that form put....

Forms!YourForm.YourList.Requery
 
works great

Thank you that works great. I tried putting it under the on click event of my exit button on the form instead of on the form close where it works beautifully.

Now I have a problem opening the form alone. I know I can use a statement like
If isopen but I am not sure how to reference different forms and subforms.

Do you know of someone that has a chart on how to reference items when you are in different areas of the database?
 
Searched in Access Help for "reference" yet?

MainForm reference...
Me.ControlName
or
Forms!MainForm.ControlName

Subform reference...
Forms!MainForm!SubFormName.Form.ControlName

Usually when in the VB window when you type the Me. identifier , VB will use a pop-up list showing available controls and methods.
 

Users who are viewing this thread

Back
Top Bottom