Article ID: 304564 - Last Review: June 25, 2004 - Revision: 2.0 ACC2000: How to Create a Custom Sort OrderThis article was previously published under Q304564 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp). SUMMARY
This article shows you how to create a custom sort order by using the Switch function. Sometimes, you may want Microsoft Access to sort based on a custom sort order (that is, not ascending or descending, but a different, user-specified sort order). For example, the Northwind sample database contains an employees table in which an employee may have one of four possible titles. Access sorts these titles alphabetically as:
MORE INFORMATION
To create a custom sort order on the Employees table in the Northwind Sample Database, follow these steps:
REFERENCESFor more information about the Switch function, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type switch function in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
| Article Translations
|
Back to the top
