Query sort on Date!

B

Bob

I have a query that has 5 fields and I want to sort order on firstly date
then another field Invoice Number
If I sort on Invoice number alone any invoices with a zero go to the bottom
no matter what date it has
Thanks in advance.........Bob Vance
 
K

Ken Snell \(MVP\)

Post the SQL of the query that you've tried. What data types are the "date"
and "invoice number" fields?
 
W

Wayne Morgan

In the query design grid, place the fields you want to sort in left to right
order. The field on the left should be the one you want to sort first. Next,
set the sort as desired (ascending or descending). If you need the fields in
a certain order, such as to fill the columns of a list box, then add the
fields you want to sort on a second time, set the sort order, and uncheck
the Show box. This will cause the query to sort on those fields without the
second copy of them being visible in the query's output. Again, they will be
sorted as you have them listed from left to right.

To properly sort a date field, the data type in the table must be set to
Date/Time.
 
B

Bob

Great Guys Brilliant..thanx Bob

Wayne Morgan said:
In the query design grid, place the fields you want to sort in left to
right order. The field on the left should be the one you want to sort
first. Next, set the sort as desired (ascending or descending). If you
need the fields in a certain order, such as to fill the columns of a list
box, then add the fields you want to sort on a second time, set the sort
order, and uncheck the Show box. This will cause the query to sort on
those fields without the second copy of them being visible in the query's
output. Again, they will be sorted as you have them listed from left to
right.

To properly sort a date field, the data type in the table must be set to
Date/Time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Query Date Order Question 10
Query Problem 2
Query Problem 3
Problem with Query 1
Count Distinct Values 2
Invoice Table Number! 3
Starting Invoice Number! 3
SQL Question - restated 3

Top