Solved

Sorting 3 columns in one table visual basic 5.0

Posted on 2002-06-25
3
168 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
Comment Utility
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
Comment Utility
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
Comment Utility
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

772 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

11 Experts available now in Live!

Get 1:1 Help Now