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 Chriss Miller 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 a List box by a particular field record?

Status
Not open for further replies.

martin

MIS
Jan 12, 1999
4
DE
Hello,

I have downloaded a program called Winreporter from Microsoft Web site and im using it to make inventory for the company where im work. I made a few list box containing information like Computer name processor speed hard drive space and more..

I am trying to sort it by computer name (field record) and i dont seem to have any option to do this. Anyone know how i could do this? If so let me know.

Thanks a lot

Martin
 
Hi!

If the row source is based on a query then you can sort the query by column desired. If it is based on a table, then write a query based on the table and sort by the desired column. If it is a value list, then you will need a good sort routine which will sort the list and resort it when any additions are made.

hth
Jeff Bridgham
bridgham@purdue.edu
 
The row source is based on a table. I know how to create a query but how can i make a query that will sort the result of one field in a table (computer name). i will also need the database to do a sort often cause i will always add new computers to that database.
 
Hi!

If you are using the design view for the query then there is a row labeled Sort which you can use to sort on any field you want to. Access will sort this query any time it is run so, when you add a new computer, the list box will be sorted automatically the next time it is opened.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Thanks Jeff,

I finally saw where it was :) Guess i wasnt looking at the good place at first.

Martin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top