Solved

Sorting 3 columns in one table visual basic 5.0

Posted on 2002-06-25
3
169 Views
Last Modified: 2013-11-25
how can we sort these columns in this manner

(Descending)     (Asscending)           (Asscending)
  JOBORD           STATUS                   DATE  
 '0001'             0                06/11/2002 8:00 AM
 '0001'             0                06/11/2002 9:00 AM
 '0002'             1                06/11/2002 10:00 PM
 '0002'             2                06/11/2002 11:00 PM

0
Comment
Question by:vbeginner
3 Comments
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 100 total points
ID: 7107394
is this a table in a Database, in which case you can add an Order By clause to the SQL that you use to retrieve the data from the Table:

Select * from JobTable ORDER BY JOBORD DESC, Status , [Date]


Ascending order is the DEFAULT for an Order By clause.
DESC indicates that field should be sorted Descending.


by the way, the use of "Date" as the name of a field in the table is NOT a good ideas, as MANY Database Management tools (MS Access, SQL Server, etc) use Date as a RESERVED Word, and thus the need for the [...] in the SQL above.

Arthur Wood
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7963014
Hi vbeginner,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept Arthur_Wood@devx's comment(s) as an answer.

vbeginner, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 8039080
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now