I'm using Access 97 under Windows XP, with all Control Panel "locale" options set for the US. I'm reading records from a linked table (in another Access 97 database) using DAO, and it is crucial that I access them in key order. Access won't let me open the Recordset as any type that permits setting the .Index property (which I'd want to set to "PrimaryKey") and warns that the records may be returned in random order if that property isn't set, so I've written a bit of code to compare each key to the one before it, and a few are being reported as showing up out of key order. It seems that both the "/" and the "-" characters are not sorting out in respect to the digit characters the way the ASCII chart suggests they should. The module's OPTION COMPARE statement is presently set to DATABASE, which the help screen says will make comparisons dependent on locale settings, but I can't find anywhere what those settings are. Any suggestions as to how to resolve this?
Here's a specific example. In the following code, the first two lines produce "True" (which basically confirms the ASCII collating sequence) while the last two produce "False".
MsgBox "-" < "/"
MsgBox "/" < "0"
MsgBox "A-19" < "A00-453"
MsgBox "A00-460" < "A00/01-454"
[This message has been edited by AlanS (edited 04-18-2002).]
Here's a specific example. In the following code, the first two lines produce "True" (which basically confirms the ASCII collating sequence) while the last two produce "False".
MsgBox "-" < "/"
MsgBox "/" < "0"
MsgBox "A-19" < "A00-453"
MsgBox "A00-460" < "A00/01-454"
[This message has been edited by AlanS (edited 04-18-2002).]