Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sorting 3 columns in one table visual basic 5.0

Posted on 2002-06-25
3
Medium Priority
?
179 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 400 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

926 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