List box - doesn't refresh

N

Norman

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?
 
L

Linq Adams via AccessMonster.com

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