Re: sort in report



Fred,

When I looked at the problem with fresh eyes this morning, I realized the
problem. Your instructions were fine and I followed them correctly. The
problem was that the building names on some of the records had been typed in
by hand (not using the drop down box) and they had spaces missing between
some of the words in the building name. So, they were appearing first on the
report, before the rest of the records with the correct building names.

Thank you very much for all of your help.



"fredg" wrote:

On Mon, 15 Oct 2007 12:54:00 -0700, cc wrote:

Fred,

I cannot get your instructions to work. There are only 4 building names, so
I'm trying to use your first suggestion. But, it is not sorting properly.
Could you review your directions to me and maybe make further clarification.
P.S. When I try to sort on the [SortThis] field, it makes me choose ascending
or descending and it is also showing an [Expression] field that I don't know
where it came from.

I appreciate your help.

"fredg" wrote:

On Thu, 11 Oct 2007 12:27:01 -0700, cc wrote:

My database has a field that is a drop down box with four building names. I
want to sort the report by building, but I don't want the buildings in
alphabetical order. How do I sort/group that field so that the buildings
appear in the specific order that I want?

In the query that is used as the report's record source, add a new
column.
SortThis:Switch([FieldName] = "BuildingC",1, [FieldName = "BuildingZ"
,2,[FieldName] = "BuildingA",3)

Then use this column in the Report's Sorting and Grouping dialog to
order the records by.

In the above the report will be ordered by
BuildingC
BuildingZ
BuildingA

Alternatively, if you have quite a few more buildings, I would suggest
a separate Building Table with a BuildingID, Building Name, and a
SortThis field.
Then establish a relationship between this table and the main table.
Then include the SortThis field in the query. The SorthThis number
will be included in the query.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail


Gee, if you don't know where that Expression Field came from, with the
information you have given, neither do I. Does it have a name?

Here's what I need.
Post the SQL of the query that is used as the report's record source.

Also, enter the BuildingNames in the order you wish to see them in the
report. Don't forget to tell me the name of the Field that contains
these building names.

In addition, tell me what the actual Report's Sorting and Grouping is
(you'll have to manually type it, i,e, somethiiong like this:
SortThis Ascending
[LastName] Ascending
etc....

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

.



Relevant Pages

  • Re: sort in report
    ... When I looked at the problem with fresh eyes this morning, ... Your instructions were fine and I followed them correctly. ... report, before the rest of the records with the correct building names. ... Then include the SortThis field in the query. ...
    (microsoft.public.access.reports)
  • Re: sort in report
    ... In the query that is used as the report's record source, ... In the above the report will be ordered by ... Then include the SortThis field in the query. ...
    (microsoft.public.access.reports)
  • RE: Very simple report production
    ... Let's keep it simple for the moment, can you advise on doing a query please. ... The way I usually respond/comprehend to instructions is through a set of ... on-line tutorial on Access;-) Do you know how to create a report? ... Has anyone got a set of instructions? ...
    (microsoft.public.access.reports)
  • Re: Reports with Date Range - Errors
    ... You were supposed to do some query testing for me. ... the instructions, and get back to me with what happened... ... > Another question for you -- I have created a query and then a report from ... Go into query design grid for the query behind the ...
    (microsoft.public.access.reports)
  • Re: Sorting Report
    ... I want the report to sort by the above combination of fields. ... Create a query that will be the record source of the report. ... report with a control bound to the SortThis field in the query. ...
    (microsoft.public.access.reports)