List box - doesn't refresh

List box - doesn't refresh

Post by Tm9ybWF » Sun, 07 Sep 2008 05:13:34


I created a list box on a form. The list box only shows the information from
another table, where the [prov-ID] on the form matches the [prov-ID] from the
other table. This is a single form view. When I move tot he next form, the
data in the list box does not change to the [prov-ID] on that form. Arghhhh.
If I hit "refresh", it does - but how do I eliminate that step?
 
 
 

List box - doesn't refresh

Post by Linq Adams » Sun, 07 Sep 2008 06:46:26

I'm not exactly sure how you're populating the listbox, but from your
description this should do the trick

Private Sub Form_Current()
If Not Me.NewRecord Then
Me.ListBoxName.Requery
End If
End Sub

Just replace

ListBoxName

with the actual name of your listbox.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via http://www.yqcomputer.com/

 
 
 

List box - doesn't refresh

Post by Tm9ybWF » Wed, 10 Sep 2008 00:09:00

Thank you - I did find another way, by using me.refresh