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 wOOdy-Soft 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 the field' value after accessing them from MS Access 1

Status
Not open for further replies.

qb828

Programmer
Sep 27, 2000
98
US
Hi Guys!

I don't know how to sort the field value.

I am accessing the one field values from the Acess database using the ASP and inserting them into the listbox(would like to insert in alpabethically)

Example)
I have address book in Access.
I am populating all the last name into the listbox so I can select one person's last name and pull entire address information from the acess database.

Can you help me to sort the last names after I got them from the database ??
THanks.



QB
 
Hi,

Try setting up your sql select string like this:

strSQL = "Select * From tbladdressbook ORDER BY fldSurname DESC;"

Substitute tbladdressbook for your table name and fldSurname with the name of the field you want to sort by.

If you want to sort from A-Z remove 'DESC'.

Cheers

ab
 
Thanks millions, ab.

Totally forgot about the sql stuffs.

Thanks.

QB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top