Microsoft KB Archive/162981

= ACC97: Export to ASP or IDC Ignores Filter/OrderBy Properties =

Article ID: 162981

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition
 * Microsoft Internet Information Server 2.0
 * Microsoft Internet Information Server 3.0

-



This article was previously published under Q162981



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



SYMPTOMS
When you export tables, queries, or forms that contain OrderBy and Filter properties to ASP or IDC format, and then browse the exported files in a Web browser, the recordset is not sorted and 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 QBE grid rather than using the OrderBy and Filter properties. Export the new query.

If you are exporting a form, create a new query that implements sorting and criteria in the QBE grid rather than using the OrderBy and Filter properties of the form. Export a form that is based on the new query.



MORE INFORMATION
Please note that IDC files will only display forms in Datasheet view whereas ASP files have the capability to display forms in single Form view. For the system requirements to run IDC or ASP files, please refer to the following article in the Microsoft Knowledge Base:

159325 ACC97: Server and Browser Requirements for Publish to Web Wizard

Steps to Reproduce Behavior
CAUTION: Following the steps in this example will modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and perform these steps on a copy of the database.

The following example reproduces the behavior when exporting to IDC. The same behavior will occur when exporting to ASP.


 * 1) In Microsoft Access 97, 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 Save As/Export.
 * 7) In the Save As dialog box, click to select "To an External File or Database," and then click OK.
 * 8) In the Save As Type box, select Microsoft IIS 1-2(*.htx; *.idc).
 * 9) In the File Name box type Employees.htx . Note the folder where the IDC/HTX files will be exported to. Make sure the file is exported to a folder with IIS execute permissions.

For more information about configuring Microsoft Internet Information Server (IIS) permissions, please refer to the IIS Help Index, and see the following article in the Microsoft Knowledge Base:

160754 ACC97: Error "HTTP/1.0 403 Access Forbidden" Browsing IDC Page
 * 1) Click Export. The HTX/IDC Output Options dialog box appears.
 * 2) 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.

For more information about how to define a system DSN, search the Help Index for "ODBC, setting up data sources," and see the following article in the Microsoft Knowledge Base:

159682 ACC97: "Data Source Name Not Found" Err Msg Opening Web Page
 * 1) 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 directory of your Web Server, type:

http:// /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.

