Listbox won't update when record changes?

Sharky II

Registered User.
Local time
Today, 16:45
Joined
Aug 21, 2003
Messages
354
Hi there!

Been away from access db's for a couple of years and have suddenly job i have to do, and of course the client wants it finished yesterday :rolleyes:

Anyway, my problem is that i have a simple form with suppier details in it - and a combo box which shows the products that that supplier has. The combo box runs on a custom query object i created that matches the supplierID's. Simple!

But for some reason when i change the supplier record, the combo box doesn't with the new list of products. The dynamic QUERY updates just fine, if i check it, however these results aren't reflected in the listbox.

If i use a subform, then that updates just fine. Alas, not the list box, though.

I must be forgetting something simple! Is there some kind of update event i have to create?

Thanks!
 
Don't forget that in the control you are selecting, you need an AfterUpdate event to requery the latter control(s).

Private Sub MyCombo_AfterUpdate()
Me.lstMyListBox.Requery
End Sub
 
Hi!

I just tried me.mylistbox.requery in the 'current' event of the form, and it worked!

i shall try it in the afterupdate now

It's all coming back... slowly!

Thanks!
 

Users who are viewing this thread

Back
Top Bottom