ACC95: FilterName Argument of OpenForm Macro Action Doesn't SortID: Q154421
|
Moderate: Requires basic macro, coding, and interoperability skills.
When the FilterName argument of an OpenForm action is based on a query or
an SQL SELECT Statement that includes the sorting of a field or fields in
ascending or descending order, sorting will be ignored when the OpenForm
action is executed.
Microsoft Access 7.0 does not automatically set the form's OrderByOn property to True when the FilterName argument of the OpenForm action uses a filter that is sorting by one or more fields.
To work around this problem, follow these steps:
Forms!<formname>.OrderByOn
Microsoft has confirmed this to be a problem in Microsoft Access 7.0. This problem no longer occurs in Microsoft Access 97.
If the filter has criteria to limit the number of records to be viewed by the form, the form will, in fact, be limited to only those records which meet the criteria's condition; but all sorting, however, will be ignored.
Macro Action
------------
OpenForm
Action Arguments
---------------------------------
Form Name: Customers
View: Form
Filter Name: Query1
Where Condition: <leave blank>
Data Mode: Edit
Window Mode: Normal
For more information about the ApplyFilter action, search for "ApplyFilter Action" using the Microsoft Access 7.0 Help Index.
Additional query words: ORDER BY
Keywords : kbusage McrArg
Version : 7.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 29, 1999