Microsoft KB Archive/265282

= HOW TO: Display Formatted Information in a FrontPage 2000 Database Region =

Article ID: 265282

Article Last Modified on 10/27/2002

-

APPLIES TO


 * Microsoft FrontPage 2000 Standard Edition

-



This article was previously published under Q265282



IN THIS TASK
SUMMARY
 * Apply the Currency Format to a Table Field

REFERENCES



SUMMARY
This article describes how to apply specific formatting to data returned by a Microsoft FrontPage 2000 database connection. For example, data from a currency field may appear as &quot;5&quot; whereas you require &quot;$5.00.&quot;

A variety of formats can be applied to database data by editing the SQL query that returns the data to the database region of your FrontPage web. The following example shows you how to apply a currency format to data from the Northwind sample database provided with Microsoft Access.

back to the top

Apply the Currency Format to a Table Field
To apply a currency format to the Unit Price field of the Products table, follow these steps:  Start Microsoft FrontPage 2000; on the File menu, point to New, click Web, click One Page Web, and then click OK. Right-click the Folder List column, click New Page on the shortcut menu, select Normal Page, and then click OK. On the Insert menu, point to Database, and then click Results. In step 1 of the Database Results Wizard, select Use a sample database connection (Northwind), and then click Next.

NOTE: If the Northwind sample database connection is not available, you need to create a connection to Northwind.mdb. For further assistance, refer to FrontPage Help as described in the &quot;References&quot; section. In step 2 of the wizard, select Custom query, and then click Edit.  In the Custom Query dialog, type the following SQL statement: Select ProductID, ProductName, Format([UnitPrice], '$##00.00') As [Unit Price] From Products Click OK to close the Custom Query dialog box, and then click Next.  In steps 3 and 4, click Next, and then in step 5, click Finish.</li> On the File menu, click Save As, type Products in the File name box, and then click Save.</li> Open another page in your web and create a hyperlink to Products.asp</li> Click the Preview tab, and then click the new hyperlink to observe the formatted database data.</li></ol>

back to the top

<div class="references_section">