Result on Combo box return prior record data

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
 
K

KARL DEWEY

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.
 
M

Mary

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
 
F

Frank H

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top