Microsoft KB Archive/225098

= ACC2000: How to Retrieve Selected Values from a Multiple Selection List Box in a Data Access Page =

Article ID: 225098

Article Last Modified on 6/24/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q225098



Advanced: Requires expert coding, interoperability, and multiuser skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SUMMARY
This article shows you how to retrieve the items that you select from a multiple selection list box in a data access page.



MORE INFORMATION
For an example of how to retrieve the values that you select in a multiple selection list box, follow these steps:

 Open any Access 2000 database. In the Database window, click Pages under Objects, and then click New. In the New Data Access Page dialog box, click Design View, and then click OK.  Add a list box to the page, and then set the following properties:   Id: CList ListRowSource: Table: Customers ListBoundField: CompanyName Multiple: TRUE   Add a command button to the page, and then set the following properties:   Id: cmdList InnerText: List Values </li> On the Tools menu, point to Macro, and then click Microsoft Script Editor.</li> On the View menu, point to Other Windows, and then click Script Outline.</li> Expand the cmdList node, and then double-click onclick.</li>  Type or paste the following script: <SCRIPT event=onclick for=cmdList language=vbscript>

</SCRIPT> </li> On the View menu, click View in Browser.</li> Select multiple items from the list.</li> Click the command button. Note that a message box appears. The message box lists the items that you selected.</li></ol>

Additional query words: multiselect multi select listbox multi-select

Keywords: kbhowto KB225098

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.