Article ID: 287432 - Last Review: November 6, 2003 - Revision: 1.0 ACC2002: Parameter Prompt Appears Twice When You Run a QueryThis article was previously published under Q287432 For a Microsoft Access 2000 version of this article, see 245467
(http://support.microsoft.com/kb/245467/EN-US/
)
.
Moderate: Requires basic macro, coding, and interoperability skills. This article applies only to a Microsoft Access database (.mdb). On This PageSYMPTOMS
When you run a parameterized query, you receive two prompts for each parameter that is defined in the query.
CAUSE
Sorting has been applied to the query in Datasheet view rather than in Design view.
RESOLUTION
To correct a query in this state, clear the OrderBy property in the property sheet in Design view of the query. To clear the OrderBy property of the query, follow these steps:
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. MORE INFORMATION
There are two ways to sort the results of a query. You can sort it by selecting Ascending or Descending in the Sort row under the relevant field in Design view of the query. Or you can run the query, and then click either the Sort Ascending or the Sort Descending command on the Records menu. If you sort the query in Design view, Microsoft Access adds the ORDER BY clause to the SQL statement of the query. If you sort the query in Datasheet view, Microsoft Access stores the sort order in the OrderBy property of the query. When the OrderBy property has been set, either on the property sheet in Design view or in Datasheet view, Microsoft Access will prompt you twice for each parameter in the query. This occurs because Microsoft Access runs the query initially to retrieve the correct records, and then runs it again to apply the sort order that you specified. Steps to Reproduce the Behavior
| Article Translations
|
Back to the top
