Link to home
Start Free TrialLog in
Avatar of Richard
Richard

asked on

access refresh combo box

I thought i could do this but the knack has escaped me.

OK, field on form also features as one of the fields returned in combo box which combo box selects the records in the form.

However when I change the field (its a lookup field) and I would like the combo box to immediately reflect that change when entered.

Its probably an after update/current form event/refresh something or other but Im not doing what I should be doing.

So help please.
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

use the afterupdate event to requery the combo box..
Agreed - as the last instruction in the code add

me.ComboBoxName.requery

(where ComboBoxName is the name of your combo box)
Avatar of Richard
Richard

ASKER

Yes but the after event of which control ?
isn't this an obvious thing, you posted
<However when I change the field (its a lookup field) and I would like the combo box to immediately reflect that change when entered.>

what is that "field" ?
Sometimes, my combobox source table contains more info than shown in the combo.  In these cases, I create a bound "list" form to the combo source table with the ability to add records.  Then, from the DOUBLE-CLICK event of the combo, I open this form, in dialog mode, let the user add the required record, then - when the form is closed, the code requeries the combo box to include the newest record... me.cboYourBox. requery

Scott C
fwiw - you can refer to this link
Use NotInList Event to Add a Record to Combo Box
http://support.microsoft.com/?kbid=197526
ASKER CERTIFIED SOLUTION
Avatar of Richard
Richard

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
upload a copy of the db
mind posting the solution..
Avatar of Richard

ASKER

stumblred on solution by chance