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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing a simple multiselect listbox

Status
Not open for further replies.

MikiH

Programmer
Sep 25, 2002
78
GB
Hi all

I've got a multiselect listbox which is set to simple. The user selects certain records then presses a command button to print the records. This works no problem.

What I want to do is clear the listbox after printing the report.

I know if I set it to extended I can requery the listbox to clear it but I would perfer to keep set as simple.


Thanks
Miki
 
Add this code after the code which opens your report.

Dim intCount As Integer
For intCount = 0 To MyList.ListCount - 1
If MyList.Selected(intCount) = True Then
MyList.Selected(intCount) = False
End If
Next
 
Hi

So simple when you know how. Works great.

Thanks a lot.

Miki.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top