Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query sort

Status
Not open for further replies.

lb1

Technical User
Apr 19, 2002
109
0
0
US
When I make a sort in a query I get the following order:
1,12,19,2,30

How can I get a sort that is:
1, 2, 12, 19, 30

Is there a specific setup to do.
Thanks for any help.
Louis
 
your data you are sorting is "text"...that's why 19 comes before 2.

change the data type to numeric and you will be sorting correctly.

****************************
Computers are possibly the most un-intelligent things ever invented, yet we let them control the world. Possibly a reflection of our own stupidity.

Robert L. Johnson III
MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
You should be able to leave the data type as a string/text but sort based on Val([YourField])

Duane
MS Access MVP
 
sorry about the ambiguity....but that is what I meant. I was taught not to use numeric fields unles doing math...other wise use text and just use something like CInt([value]) to sort...

****************************
Computers are possibly the most un-intelligent things ever invented, yet we let them control the world. Possibly a reflection of our own stupidity.

Robert L. Johnson III
MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top