FP2000: How to Display a Picture Using a Microsoft Access Database

ID: Q216285


The information in this article applies to:
  • Microsoft FrontPage 2000


SUMMARY

This article explains how to display a picture by using text information from a Microsoft Access database.


MORE INFORMATION

NOTE: This article requires at least a working knowledge of Microsoft Access.


  1. Create a table called PicTable in a Microsoft Access database. Save it as PicDb.mdb. The table should look like the following.

    ID Description PicName
    1 Picture of a city skyline images/city.gif
    2 Picture of a sunset images/sunset.gif

    Both the Description and PicName will be text fields in the Microsoft Access database.


  2. Open FrontPage 2000 and create a new web by using the Personal Web template.

    NOTE: In this example, you are using the Personal Web template along with the pictures in the images folder. This is only to demonstrate the concept. You can easily use the same steps with your web.


  3. Import the database you created in step 1 into the web. When prompted as to whether you want to create the database connection for the imported file, type Pics in the Name field, and then click Yes.

    When FrontPage asks whether you want to import the database files to the fpdb folder, click Yes.


  4. On the View menu, click Page, and create a new Normal Page.


  5. On the Insert menu, click Database, and then click Results.


  6. In step 1 of the Database Results Wizard, use Pics as the connection and then click Next.


  7. In Step 2 of the Database Results Wizard, use PicTable as the Record Source, and then click Next.


  8. In Step 3 of the Database Results Wizard, click Next.


  9. In Step 4 of the Database Results Wizard, click Next.


  10. In Step 5 of the Database Results Wizard, click Finish. The Database Results Region table will be created on the page.


  11. Locate the database column value that reads "<<PicName>>" and delete it.


  12. In the table cell that you just removed the column value from, insert the City.gif picture from the images folder by using the Picture command on the Insert menu. This places the city image in the table.



  13. Right-click the image you just inserted, and click Picture Properties.


  14. Under Picture Source, click Browse, and then click Parameters.


  15. In the path field, remove the current path and then click Insert Field Parameter and select PicName.


  16. Click OK three times. You see a small broken image icon in the column under PicName.


  17. Save the page as Show.asp on the File menu.


  18. On the File menu, click Preview in Browser.



Additional query words: front page

Keywords : kbdta
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: October 12, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.