<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1226" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=073000013-05092003><FONT face=Arial color=#0000ff size=2>Call
this public function from any form that has a list box. It can be
used to SELECT ALL or UNSELECT ALL items.</FONT></SPAN></DIV>
<DIV><SPAN class=073000013-05092003><FONT face=Arial color=#0000ff
size=2>----------------</FONT></SPAN></DIV>
<DIV><SPAN class=073000013-05092003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=073000013-05092003><FONT face=Arial color=#0000ff size=2>Public
Function FillClearListBox(ctlList As Control, bytAction As Byte) As
Boolean<BR>'Selects or Deselects all items in list
box<BR>Arguments:</FONT></SPAN></DIV>
<DIV><SPAN class=073000013-05092003><FONT face=Arial color=#0000ff
size=2> 'ctlList: the fully articulated name of the listbox
(e.g. Forms!frmMyForm!lstMyList)</FONT></SPAN></DIV>
<DIV><SPAN class=073000013-05092003><FONT face=Arial color=#0000ff
size=2> 'bytAction: The type of action desired; 1=Select
All, 2=Unselect All</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=073000013-05092003><FONT face=Arial color=#0000ff size=2>On
Error GoTo eh</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=073000013-05092003><FONT face=Arial color=#0000ff
size=2> Dim intItem As Integer<BR>
</FONT></SPAN></DIV>
<DIV><SPAN class=073000013-05092003><FONT face=Arial color=#0000ff size=2>'Loop
through each item on list and either select or deselect
it.<BR> For intItem = 0 To ctlList.ListCount -
1<BR> Select Case
bytAction<BR>
Case 1: ctlList.Selected(intItem) =
True<BR> Case
2: ctlList.Selected(intItem) =
False<BR> End
Select<BR> Next</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=073000013-05092003><FONT face=Arial color=#0000ff
size=2>ex:<BR> Set ctlList = Nothing<BR>
Exit Function<BR>eh:<BR> MsgBox
Err.Description<BR> GoTo ex<BR>End
Function<BR>--------------------------</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<P><FONT size=2>Steve Capistrant<BR>Symphony Information
Services<BR>scapistrant@symphonyinfo.com<BR>Phone:
612-333-1311<BR>www.symphonyinfo.com<BR>212 3rd Ave N, Ste 404<BR>Minneapolis,
MN 55401<BR></FONT></P>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com]<B>On Behalf Of </B>Dale
Kalsow<BR><B>Sent:</B> Friday, September 05, 2003 7:41 AM<BR><B>To:</B>
accessd@databaseadvisors.com<BR><B>Subject:</B> [AccessD] listbox
question<BR><BR></FONT></DIV>
<DIV>Ok, I know this should be easy but I am still having a problem with
it. Does any know how to select all of the items in a listbox? </DIV>
<DIV> </DIV>
<DIV>Thanks!</DIV>
<DIV> </DIV>
<DIV>Dale</DIV>
<P>
<HR SIZE=1>
Do you Yahoo!?<BR><A
href="http://us.rd.yahoo.com/evt=10469/*http://sitebuilder.yahoo.com">Yahoo!
SiteBuilder</A> - Free, easy-to-use web site design software</BODY></HTML>