Refresh a listbox

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

Gdub

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

Nick Mirro

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.
 

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