ACC97: Display Problems When Refreshing ASP Forms in Browser

Last reviewed: July 21, 1997
Article ID: Q164493
The information in this article applies to:
  • Microsoft Access 97

SYMPTOMS

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

When you export a Microsoft Access 97 form to Active Server Pages (ASP) format, and then view the file with your Web browser program, you notice one of the following problems when you click the Refresh button:

  • The form becomes blank and does not display anything at all.
  • The form displays only some of the fields or navigation buttons that it actually contains.
  • The form continues to display the same record, even though that record was deleted from the database.

CAUSE

The record you are viewing with the ASP file has been deleted from the database, and the ASP file is unable to refresh the screen correctly because it cannot requery the same record.

RESOLUTION

In most cases, you must quit your Web browser program and restart it again before you can view the ASP form and its data correctly. If the navigation buttons still appear on your form, such as the First, Last, Next or Previous record buttons, you may be able to click one or more of them to restore the form to its original state.

MORE INFORMATION

ASP files use open database connectivity (ODBC) with a programming language, such as VBScript or JScript, to view and manipulate the data in your database. When you refresh the record you are viewing on an ASP form, the form tries to access and display an updated version of the same record. If that record is no longer available, the form cannot display it, and consequently the form is not repainted properly on your screen.

The same situation can occur if you refresh an ASP form that is based on an empty recordset, such as a table that does not contain any rows. When you first view the form in your Web browser, you see all of the field labels and navigation buttons on an empty form that is ready for you to enter data. If you refresh the form, there is no data in the table to display and the form is blank on your screen.

Steps to Reproduce Behavior

  1. Start Microsoft Access and open the sample database Northwind.mdb.

  2. Select the Shippers table in the Database window.

  3. On the Edit menu, click Copy, and then on the Edit menu, click Paste.

  4. In the Paste Table As dialog box, type TestASP in the Table Name box, click Structure And Data, and then click OK.

  5. Select the TestASP table in the Database window, and then click Autoform on the Insert menu. Save the new form as frmTestASP.

  6. Save the frmTestASP form in ASP format using the Save As/Export command or the Save As HTML command on the File menu. Save it in a folder on your Web server where you have Execute permission.

  7. Start Microsoft Internet Explorer 3.0 or another Web browser program and type the uniform resource locator (URL) for your ASP file in the Address box. Note the record that is displayed, which is probably the record for Speedy Express.

  8. In Microsoft Access, open the TestASP table in Datasheet view, and delete the record for Speedy Express, or whichever record is currently displayed in your Web browser.

  9. Return to your Web browser and click the Refresh button on the form. Note that the form displays as indicated in the "Symptoms" section of this article.

REFERENCES

For more information about creating ASP files and other Internet solutions using Microsoft Access 97, please refer to "Building Applications with Microsoft Access 97," Chapter 21, "Developing Applications for the Internet and the World Wide Web," pages 587-629.


Additional query words: ADO blank empty IE
Keywords : FmsOthr IntAsp IntpWeb kbinterop
Version : 97
Platform : WINDOWS
Hardware : x86
Issue type : kbprb


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 21, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.