Microsoft KB Archive/265309

= HOW TO: Create a Drop-Down List with Multiple Data Columns in FrontPage 2000 =

Article ID: 265309

Article Last Modified on 11/23/2006

-

APPLIES TO


 * Microsoft FrontPage 2000 Standard Edition

-



This article was previously published under Q265309



IN THIS TASK
SUMMARY
 * Multiple Data Column Drop-Down Lists



SUMMARY
This article explains how to create a drop-down list box in a Microsoft FrontPage web that displays more than one field or column. For example, you may want to show both FirstName and LastName columns from a database table in such a list box. Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site:

https://partner.microsoft.com/global/30000104

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

back to the top

Multiple Data Column Drop-Down Lists
Drop-down selection lists typically draw their information from a database table and, by default, display only one column of data. If you want to display more than one data column in the list, you need to modify the code that is created by the Insert Database Wizard in FrontPage 2000.

To create a drop-down list box that displays both the FirstName and LastName columns from the Employees table of the Northwind sample database, follow these steps:  Start FrontPage 2000; on the File menu, point to New, click Web, click One Page Web, and then click OK. On the Insert menu, point to Database, and then click Results.

NOTE: If Database is not available on the Insert menu, you need to import a database into your web. In the Database Results Wizard - Step 1 of 5 dialog box, select Use a sample database connection (Northwind), and then click Next. In the Step 2 of 5 dialog box, select the Record Source box, select Employees, and then click Next. In the Step 3 of 5 dialog box, click Edit List and remove all fields except FirstName and LastName from the displayed fields box. Click OK, and then click Next. In the Step 4 of 5 dialog box, select Drop-Down List - one record per item in the Choose formatting options for the records returned by the query box, and then click Next. Finish the rest of wizard instructions and click Finish.</li> Click the drop-down list box, and then click the HTML tab.</li>  In the highlighted section, locate the following line of code <%=FP_FieldHTML(fp_rs,&quot;FirstName&quot;)%> and revise it to the following: <%=FP_FieldHTML(fp_rs,&quot;LastName&quot;) & &quot;, &quot; & FP_FieldHTML(fp_rs,&quot;FirstName&quot;)%> NOTE: Before modification, the code may show either &quot;FirstName&quot; or &quot;LastName,&quot; depending on the order in which you selected these items in the Step 3 of 5 dialog box.

NOTE: If you copy and paste code on the HTML tab, you may find that special characters, such as ampersands (&) and angle brackets are converted into their HTML equivalents (&, <, and >). If so, you need to copy the code into a blank Notepad document, and then copy it from Notepad and paste it into FrontPage. </li> Save the page and preview it in your browser.

NOTE: You must preview in your browser; the Preview tab does not display the drop-down list in its viewable form.</li></ol>

back to the top

<div class="references_section">