Applies To Database object, Field object.
Description
Returns a value that specifies the sequence of the sort order in text for string comparison or sorting (Microsoft Jet workspaces only).
Return Values The return value is a Long value or constant that can be one of the following values.Constant | Sort order |
dbSortGeneral | General (English, French, German, Portuguese, Italian, and Modern Spanish) |
dbSortArabic | Arabic |
dbSortChineseSimplified | Simplified Chinese |
dbSortChineseTraditional | Traditional Chinese |
dbSortCyrillic | Russian |
dbSortCzech | Czech |
dbSortDutch | Dutch |
dbSortGreek | Greek |
dbSortHebrew | Hebrew |
dbSortHungarian | Hungarian |
dbSortIcelandic | Icelandic |
dbSortJapanese | Japanese |
dbSortKorean | Korean |
dbSortNeutral | Neutral |
dbSortNorwDan | Norwegian or Danish |
dbSortPDXIntl | Paradox International |
dbSortPDXNor | Paradox Norwegian or Danish |
dbSortPDXSwe | Paradox Swedish or Finnish |
dbSortPolish | Polish |
dbSortSlovenian | Slovenian |
dbSortSpanish | Spanish |
dbSortSwedFin | Swedish or Finnish |
dbSortThai | Thai |
dbSortTurkish | Turkish |
dbSortUndefined | Undefined or unknown |
Remarks The availability of the CollatingOrder property depends on the object that contains the Fields collection, as shown in the following table.
If the Fields collection belongs to an | Then CollatingOrder is |
Index object | Not supported |
QueryDef object | Read-only |
Recordset object | Read-only |
Relation object | Not supported |
TableDef object | Read-only |
See Also Attributes property.
Example This example displays the CollatingOrder property for the Northwind database and for individual fields in a table.Sub CollatingOrderX()
Dim dbsNorthwind As Database
Dim fldLoop As Field
Set dbsNorthwind = OpenDatabase("Northwind.mdb")
With dbsNorthwind
' Show collating order of Northwind database.
Debug.Print "Collating order of " & .Name & " = " & _
.CollatingOrder
' Show collating order of a TableDef object's fields.
Debug.Print "Collating order of fields in " & _
.TableDefs(0).Name & " table:"
For Each fldLoop In .TableDefs(0).Fields
Debug.Print " " & fldLoop.Name & " = " & _
fldLoop.CollatingOrder
Next fldLoop
.Close
End With
End Sub
Example (Microsoft Access)
The following example checks the CollatingOrder property for the current database:
Sub SetSortOrder()
Dim dbs As Database
' Return reference to current database.
Set dbs = CurrentDb
' Check CollatingOrder property for database.
Debug.Print dbs.CollatingOrder
Set dbs = Nothing
End Sub