Refresh a listbox

  • Thread starter Thread starter Nick Mirro
  • Start date Start date
N

Nick Mirro

I have a subform with a combo and a listbox. When I add data into the
combo, I want it to be reflected in the listbox immediately. Now, it only
works if the entire form is refreshed with f9 or reopening it.

I tried "Me!ListControl.requery" for the subform on update, on dirty, etc.
I also tried it for a variety of events for the combo. How can I get this
listbox to update as soon as I enter the data in the combo.
 
I just received the same help a few moments ago from a
post done on 10/31/03 9:41pm at this same discussion group.
To refresh, set up the following code on your button or
drop-down:

Dim intI As Integer
Dim lngMyValue As Long
For intI = 0 To Me.List16.ListCount - 1
Me.List16.Selected(intI) = False
Next intI

You'll want to change the "Me.List16" to whatever name
your listbox is.

It worked great for deselecting all selections on my
listbox.
 
No luck. Thanks for the help though.

Nick


Gdub said:
I just received the same help a few moments ago from a
post done on 10/31/03 9:41pm at this same discussion group.
To refresh, set up the following code on your button or
drop-down:

Dim intI As Integer
Dim lngMyValue As Long
For intI = 0 To Me.List16.ListCount - 1
Me.List16.Selected(intI) = False
Next intI

You'll want to change the "Me.List16" to whatever name
your listbox is.

It worked great for deselecting all selections on my
listbox.
 
Back
Top