ACC95: FilterName Argument of OpenForm Macro Action Does Not Sort (154421)
The information in this article applies to:
- Microsoft Access for Windows 95 7.0
This article was previously published under Q154421
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
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.
CAUSE
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.
RESOLUTION
To work around this problem, follow these steps:
- Add a new SetValue action to immediately follow the OpenForm action.
- Set the Item argument of the SetValue action to
Forms!<formname>.OrderByOn
where <formname> is the name of the form being opened.
- Set the Expression argument of the SetValue action to True
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access 7.0. This
problem no longer occurs in Microsoft Access 97.
REFERENCES
For more information about the ApplyFilter action, search for "ApplyFilter
Action" using the Microsoft Access 7.0 Help Index.
Modification Type: | Major | Last Reviewed: | 7/5/2002 |
---|
Keywords: | kbbug kbusage KB154421 |
---|
|