Solved

Need Access 2007 Report to sort ASC

Posted on 2010-09-13
7
627 Views
Last Modified: 2012-05-10
Greetings:

I have created a report in an Access 2007 database. My Report source SQL statement is below. In the attached screenshot, you can see that teh report is a listing of employees by Manager. The Manager field is being fed by the alias shown below. I want the Managers to sort ASC by the Manager's last name. I tried adding ASC to the statement below, with no luck. Any idea what I am doing wrong?

SELECT tbl_Employees.*, tbl_Managers.[Lname] & ", " & tbl_Managers.[Fname] AS MgrName
FROM tbl_Managers INNER JOIN tbl_Employees ON tbl_Managers.ID = tbl_Employees.ManagerID
ORDER BY tbl_Managers.Lname, tbl_Managers.Fname;

reportscreenshot.jpg
0
Comment
Question by:smsdesigns
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 167 total points
ID: 33661707
The sort order in the SQL statement is of no use.  You need to set up a Sort Order within your report.

Opent the report in design view, click the Group&Sort icon on the ribbon bar.

Click the Add a Sort button. then select the appropriate field from the dropdown list.
0
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 167 total points
ID: 33661734
in the design view of the report, click on the Sorting and Grouping and enter the Field name in the Sorting  and Grouping Window
0
 
LVL 19

Assisted Solution

by:MINDSUPERB
MINDSUPERB earned 166 total points
ID: 33661751
smsdesigns,

The steps below may help you achieve what you want for your report:

1. In Report Design View, Click the design tab
2. Select Group and Sort in Grouping and Totals Group
3. You can work around grouping and sorting in the Group, sort and Total window at the bottom part of the window.

Do hope those steps help you.

Sincerely,

Ed
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33661758
you may need to include to your SQL statement the fields LName and FName


SELECT tbl_Employees.*, tbl_Managers.[Lname] & ", " & tbl_Managers.[Fname] AS MgrName, LName,FName
FROM tbl_Managers INNER JOIN tbl_Employees ON tbl_Managers.ID = tbl_Employees.ManagerID
0
 
LVL 19

Expert Comment

by:MINDSUPERB
ID: 33661783
smsdesigns,

Please disregard my post. It's a duplication with other EE's post.

I am sorry fyed and carpricorn1.

Sincerely,

Ed
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33661798
NP...
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 33661839
Happens all the time.  

What I hate is when I start a response when there are no others posted, get sidetracked, and 30 minutes later complete my response and hit send, then see that 3 or 4 others have already posted the same response.  
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Query Dilema in Access 2010 3 37
Calculation in a Report 13 41
Excel graph in access report 1 32
Outlook mail to Access 8 20
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

732 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