Microsoft KB Archive/208709

= ACC2000: Export to ASP or IDC Ignores Filter and OrderBy Properties =

Article ID: 208709

Article Last Modified on 1/26/2005

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



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.

 Open the sample database Northwind.mdb. Open the Employees table. Click the First Name column to select it. Click the Sort Ascending button on the toolbar. Close the table and save the changes. The OrderBy property should now contain a string appropriate for the sort that was applied.</li> With the table selected, on the File menu, click Export.</li> In the Save As Type box, click Microsoft IIS 1-2.</li> 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.</li> Click Save. The HTX/IDC Output Options dialog box appears.</li> 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.

</li> 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:// /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.</li></ol>

Additional query words: Internet prb

Keywords: kbinterop kbprb KB208709

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.