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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to sort alphabetically when actual data is number?

Status
Not open for further replies.

tobymom

Programmer
Aug 18, 2006
36
US
Dear Experts,

Here's my situation. Please parden me if this is too basic question...

I have a table "tblName" as following:

id name
1 David
2 Robert
3 Peter
4 Andy

on table "tblRecord", those names are stored as number using combo box trick with bound column 1 but showing only 2nd column for displaying purpose.

now I have to display those names in alphabetical order (ascending). However, if I say "ascending" on a query for that field "Name", it'll sort by id, not by name.

Could you please shed me some light on this?

Thank you.
 
Simply JOIN tblName to tblRecord in your query.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV,

It worked like a charm! Thank you so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top