ACC2000: Export to ASP or IDC Ignores Filter and OrderBy Properties (208709)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q208709
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

SYMPTOMS

When you export tables, queries, or forms that contain OrderBy and Filter properties to ASP or IDC format, and then browse to the exported files in a Web browser, you notice that the recordset is not sorted, and that it outputs all records.

CAUSE

The Filter and OrderBy properties are not used when the SELECT statements that the Web files use are generated.

RESOLUTION

If you are exporting a table or query, create a new query that implements sorting and criteria in the query design grid rather than by using the OrderBy and Filter properties, and the export the new query.

If you are exporting a form, create a new query, or modify the existing query, and implement sorting and criteria in the query design grid. Delete the OrderBy and Filter properties of the form. Set the RecordSource property to the new or modified query, and then export the form.

MORE INFORMATION

IDC files can display forms only in Datasheet view. ASP files published by earlier versions of Access can use the HTML Layout ActiveX control to display forms in single Form view. However, the HTML Layout ActiveX control is not supported by Access 2000. Therefore, ASP output is now limited to Datasheet view.

Steps to Reproduce Behavior

The following example reproduces the behavior when you export to IDC. The same behavior also occurs when you export to ASP.

  1. Open the sample database Northwind.mdb.
  2. Open the Employees table.
  3. Click the First Name column to select it.
  4. Click the Sort Ascending button on the toolbar.
  5. Close the table and save the changes. The OrderBy property should now contain a string appropriate for the sort that was applied.
  6. With the table selected, on the File menu, click Export.
  7. In the Save As Type box, click Microsoft IIS 1-2.
  8. In the File Name box, type Employees.htx. Note the folder to which the IDC/HTX files are exported. Make sure the files are exported to a folder that has IIS execute permissions.
  9. Click Save. The HTX/IDC Output Options dialog box appears.
  10. In the Data Source Name box, enter the name of a System DSN that points to the sample database Northwind.mdb. Click OK. Note that two files are created: Employees.idc and Employees.htx.

  11. Type the Uniform Resource Locator (URL) in the address box of your Web browser to view Employees.IDC. For example, if you saved your IDC/HTX files in the scripts folder of your Web Server, type:

    http://<servername>/Scripts/Employees.idc

    Note that the URL depends upon where your files are located on the Web Server. The records displayed in the Web browser are not sorted by first name.

Modification Type:MinorLast Reviewed:1/26/2005
Keywords:kbinterop kbprb KB208709