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

Force the order of a table in a form 1

Status
Not open for further replies.

Excorsa

IS-IT--Management
Mar 28, 2005
23
US
Hi, I have a table that lists status of milestones. When I use this field in a form it sorts it alphabetically. I need to force it to stay in a certain order. How do I go about this. I tried to set up another field in the table of numbers to force the order but in the form it still sorts it alpha. Any help would be greatly appreciated.
 
Are you using a query? Or just assigning the record source to that table?
 
I use a query to build the form and I want to allow the user to be able to change the status on the milestone as needed. but I want the list of status to be in a certain order.
 
Based on the status - does the order change? For example, if the status types are active and inactive - do you want them grouped by that but then within that have the ordered?

If so,

Then:

Code:
SELECT
numId, ColumnA, ColumnB, status
from tblTable
order by status, numId

where numID is the number you referenced in your original post (to enforce the order)..

If this does not help.. please post your query..


 
No, it does not change the order. It is just an update form so that they can update the status and various other info on the milestones. I just want the list of possible status options to be in a logical order not in an alphabetical order.
 
Can you put an id in the table and number them according to how you want them displayed? Then for the query:

SELECT numStatusID, txtStatusDesc FROM tblStatus ORDER BY numStatusID;

tblStatus

numStatusID txtStatusDesc
1 milestone1
2 milestone2
3 milestone3
 
Yes, that took care of it. Thank you for all your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top