Result on Combo box return prior record data

  • Thread starter Thread starter Mary
  • Start date Start date
M

Mary

I have a combo box for items that are being selected via a query based on a
PO number that is entered on the form...first time through the combo box
returns the correct items associated with the entered PO...but when a new Po
is selected the items from the previous PO are still displayed...what am I
missing?
Thanks
 
You need an 'On Update' event 'Requery' to refresh it.
I use macros.
Create macro that has action Requery.
Open form in design view, click on the combo, double click, scroll down, and
select properties. Scroll to the After Update property and use the pull down
to pick the marco created above.
 
Karl
It now displays correctly within the box (thank you)....but. ..what should
I use as an argument for the Requery...if I leave it blank..it returns the
item from the first PO..if I use cbo_Ritem I rec a 2109 run time error

Thanks
 
Some of this depends upon the RowSource for the combo box.
Try this: make another macro like Karl suggested, and on this one make the
argument the combo box. Then on the Form's property sheet, go to the
OnCurrent event of the form; put the new macro's name in there. Apparently
what you want to have happen is for your combo box to update whenever you go
to a new record on the form. If so, the above might do the trick.
 
Back
Top