Sorting order different than query

G

Guest

I have a query and a report that is based on the query. The sort order (bid
date, then job name ascending) is working in the query, but when I preview
the report is it still the old sorting. Is there anyway to fix this?
 
G

Guest

Hello,

I had a similar question, but a little different. This post helped me fix
the problem, so I thought I would add a note for others.

If you are trying to use the reports Order By property and your report is
using the Group By property, the Group By will override the ORder by
property. My report would not sort using Order By, until I read this message
and checked that Group By was set. Once Group by was deleted, my Order By
worked great.

Thanks for helping even though it was in a round-about way.

phillip9
 
G

Guest

helped me too, thanks rick b

phillip9 said:
Hello,

I had a similar question, but a little different. This post helped me fix
the problem, so I thought I would add a note for others.

If you are trying to use the reports Order By property and your report is
using the Group By property, the Group By will override the ORder by
property. My report would not sort using Order By, until I read this message
and checked that Group By was set. Once Group by was deleted, my Order By
worked great.

Thanks for helping even though it was in a round-about way.

phillip9
 
G

Guest

Hello,

I thought I'd nearly solved my problem there, not quite though!!
I like the sort order of my query, although it appears totally random (!) it
is the order in which I chose to type my order lines & there is a lot of
reason in it.
I cannot sort by anything in particular because there is nothing, other than
order entry.
Order entry works fine in the query, but not in the report.
If I remove the 'group by' in the report then all is fine, but I need to
group by supplier & then order number for expediting.
Why when it has sorted by any groups I have stated, does it not take the
query order?
BTW I cannot use automatic numbering when creating the order line, because I
sometimes import my order lines from Excel.
Failing all else, is there a way to create a field that increments in my
query, since that would be in the correct order & I could then use that for
sorting purposes in my reports?

All help much appreciated!
 
M

Marshall Barton

Annie in France said:
I thought I'd nearly solved my problem there, not quite though!!
I like the sort order of my query, although it appears totally random (!) it
is the order in which I chose to type my order lines & there is a lot of
reason in it.
I cannot sort by anything in particular because there is nothing, other than
order entry.
Order entry works fine in the query, but not in the report.
If I remove the 'group by' in the report then all is fine, but I need to
group by supplier & then order number for expediting.
Why when it has sorted by any groups I have stated, does it not take the
query order?
BTW I cannot use automatic numbering when creating the order line, because I
sometimes import my order lines from Excel.
Failing all else, is there a way to create a field that increments in my
query, since that would be in the correct order & I could then use that for
sorting purposes in my reports?


Sorry, there is no built-in information in a table that
indicates when records were entered. When you view a table
in sheet view, Access can display the records in any order
that it likes (generally the most efficient/fastest order or
sorted by the primary key. The ***only*** way to retrieve
records in a specified order is by using a query with an
ORDER BY clause. Even reports generate an intrnal query to
get the records in the order you specified in the Sorting
and Grouping window.

You ***must*** have one or more fields that can be used to
sort the records. Note that an AutoNumber primary key may
look sufficient for this, but this is **not** reliable over
time.

The simplest approach is to add a Date field to the table
and set its DefaultValue to Now(). This will automatically
time stamp each new record with its date and time of
creation. If your existing records are sorted the way you
want using their primary key, then use that to fudge
acceptable values into the new field using an UPDATE query.
 

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

Top