Full Version: Table Properties - Sorting Numbers
UtterAccess Discussion Forums > Microsoft® Access > Access Tables + Relationships
Tricky21
I have a Column within a Table called Reference that contains a unique reference (Primary Key) in the following format UP1, UP2 etc. However, I am aware there is a problem with Access sorting these values. How do I get Access to sort them numerically?
Francois
Create a query.
Add a column with following expression :
SortOrder: Val(Mid([YourKeyField],3))
Replace YourKeyField with the name of your field
Set the Sorting of this column to Ascending
Add other fields you want to work with and base your forms and reports on this query.

This suppose that the key always begin with two letters.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.