Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing Form: How to move to top of ListBox

Status
Not open for further replies.

LaCour

MIS
Jul 15, 2004
53
0
0
US
I have form with many unbound controls; they are used to generate a filter for the subform when a "Search" cmd button is pressed. I also have a "Clear" cmd button that will reset all of the unbound controls and refresh the subform.

Everything is working fine. However, I have a couple of list boxes that don't move back to the top of the listbox. I am able to de-select those rows that are selected, but I am not sure how to move the listboxes to the top as it is / was when the form initially opens.

Thanks in advance
Blair
 
You may try something like this:
strSQL = [name of listbox].RowSource
[name of listbox].RowSource = ""
[name of listbox].RowSource = strSQL

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
or . . . . .

[blue]ListBoxName.RowSource = ListBoxName.RowSource[/blue]

This is just another form of what [blue]PHV[/blue] has provided. Be aware: [blue]this will clear the listbox of any selection[/blue] . . . .

Calvin.gif
See Ya! . . . . . .
 
Tried a bunch of things and this was it!!!

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top