Microsoft KB Archive/164002

= ACC97: Web Browser Error Opening Subform in ASP File =

Article ID: 164002

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q164002



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
When you use Microsoft Internet Explorer to open an ASP file that was created from a form and a subform in Microsoft Access 97, you may receive the following error message:

Internet Explorer cannot open the Internet site . The site was not found. Make sure the address is correct, and try again.

NOTE: You may receive a different error message if you use a Web browser other than Microsoft Internet Explorer.

If you use a proxy server for your Internet access, you may receive an error similar to the following:

HTTP Proxy reports: The proxy server has encountered an error (Host was not found).



CAUSE
You did not specify a Server URL or you typed an incorrect Server URL when you exported the form to ASP format in Microsoft Access 97.



RESOLUTION
Re-create the ASP files, and specify the full path to the ASP page in the Server URL in the Microsoft Active Server Pages Output Options dialog box. For example, specify http://myserver/%3Cscripts%3E, where is the name of the folder in which the ASP files exist.



MORE INFORMATION
When you export forms to ASP format, Microsoft Access creates several files. The Server URL information is included in the ASP script files that are generated in order to reference the correct path to the subform. The Server URL is the location where the ASP files are stored on your Web server. For example, if you store the ASP files in the \ASPsamp folder on the \\PubTest server, http://pubtest/aspsamp/ is your Server URL. If you do not enter a Server URL when you create the ASP files, your Web browser will be unable to locate and open the subform.

Steps to Reproduce Behavior

 * 1) Create a System DSN on your Web server that points to the Northwind sample database. For more information about creating a System DSN, please see the following article in the Microsoft Knowledge Base:

159682 ACC97: "Data Source Name Not Found" Err Msg Opening Web Page
 * 1) Start Microsoft Access 97 and open the sample database Northwind.mdb.
 * 2) Select the Orders form in the Database window, and on the File menu, click Save As/Export.
 * 3) In the Save As dialog box, click "To an External File or Database," and then click OK.
 * 4) In the "Save Form 'Orders' In" dialog box, select Microsoft Active Server Pages (*.asp) in the Save As Type box, and type Orders.asp in the File Name Box. Select a folder to store the ASP files, and then click Export.
 * 5) In the Microsoft Active Server Pages Output Options dialog box, type the name of the System DSN you created in step 1 in the Data Source Name box, and delete any information in the Server URL box. Click OK.
 * 6) Copy the files that you just created -- Orders.asp, Orders Subform.asp, and Ordersalx.asp -- to a folder on your Web server where you have Execute permission.
 * 7) Start your Web browser and type the URL in the address box to view Orders.asp. For example, if you copied your ASP files to the \InetPub\ASPsamp folder on your Web server, type http://%3CServerName%3E/ASPsamp/Orders.asp.

Note that your Web browser returns an error when it tries to open the subform because you did not enter a Server URL in step 6.

