Sorting Problem

M

MB

I have a database of training courses taken by our employees. It has a form
with a drop-down to select a specific employee for a report (rpt By Specific
Employee). Upon selection, the report appears in print-preview of that
specific employee. The record source of the report is a query (qry Specific
Employee). When this query is run from database view, it sorts correctly
(by course start date), but in the report, it sorts by Course name.

Before creating the drop-down form, the report sorted correctly by start
date. I can't figure out how a form would make a difference in the outcome
if no changes were made to the query.

The form name is frmEmployeeLocator and in the criteria of the query is:
[Forms]![FrmEmployeeLocator]![cboEmployeeName] under ENAME (employee name)
field.

There is no record source for the form. Does that make a difference? I do
have a macro (mcr Open Rpt - Specific Employee) next to the "On Click"
property of this form.

What am I missing?

Thanks so much for your help. I'm using Access 2007.


MB
 
J

JamesDeckert

Check the sorting and grouping (toolbar button in design view of the report)
of the report which would reorder any query order.

hth,
James Deckert
 
A

Allen Browne

Open the report in design view.
Open the Sorting And Grouping dialog (View menu.)
Specify the sorting options there.
 
M

Marshall Barton

MB said:
I have a database of training courses taken by our employees. It has a form
with a drop-down to select a specific employee for a report (rpt By Specific
Employee). Upon selection, the report appears in print-preview of that
specific employee. The record source of the report is a query (qry Specific
Employee). When this query is run from database view, it sorts correctly
(by course start date), but in the report, it sorts by Course name.

Before creating the drop-down form, the report sorted correctly by start
date. I can't figure out how a form would make a difference in the outcome
if no changes were made to the query.

The form name is frmEmployeeLocator and in the criteria of the query is:
[Forms]![FrmEmployeeLocator]![cboEmployeeName] under ENAME (employee name)
field.

There is no record source for the form. Does that make a difference? I do
have a macro (mcr Open Rpt - Specific Employee) next to the "On Click"
property of this form.

What am I missing?


You are missing the fact that sorting a report should be
specified in the report's Sorting and Grouping window.
 
M

MB

Thank you, too, Marshall!!!
--
MB


Marshall Barton said:
MB said:
I have a database of training courses taken by our employees. It has a form
with a drop-down to select a specific employee for a report (rpt By Specific
Employee). Upon selection, the report appears in print-preview of that
specific employee. The record source of the report is a query (qry Specific
Employee). When this query is run from database view, it sorts correctly
(by course start date), but in the report, it sorts by Course name.

Before creating the drop-down form, the report sorted correctly by start
date. I can't figure out how a form would make a difference in the outcome
if no changes were made to the query.

The form name is frmEmployeeLocator and in the criteria of the query is:
[Forms]![FrmEmployeeLocator]![cboEmployeeName] under ENAME (employee name)
field.

There is no record source for the form. Does that make a difference? I do
have a macro (mcr Open Rpt - Specific Employee) next to the "On Click"
property of this form.

What am I missing?


You are missing the fact that sorting a report should be
specified in the report's Sorting and Grouping window.
 
M

MB

That did it! Thank you, thank you, thank you!!!
--
MB


Allen Browne said:
Open the report in design view.
Open the Sorting And Grouping dialog (View menu.)
Specify the sorting options there.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

MB said:
I have a database of training courses taken by our employees. It has a
form
with a drop-down to select a specific employee for a report (rpt By
Specific
Employee). Upon selection, the report appears in print-preview of that
specific employee. The record source of the report is a query (qry
Specific
Employee). When this query is run from database view, it sorts correctly
(by course start date), but in the report, it sorts by Course name.

Before creating the drop-down form, the report sorted correctly by start
date. I can't figure out how a form would make a difference in the
outcome
if no changes were made to the query.

The form name is frmEmployeeLocator and in the criteria of the query is:
[Forms]![FrmEmployeeLocator]![cboEmployeeName] under ENAME (employee name)
field.

There is no record source for the form. Does that make a difference? I
do
have a macro (mcr Open Rpt - Specific Employee) next to the "On Click"
property of this form.

What am I missing?

Thanks so much for your help. I'm using Access 2007.


MB
 
M

MB

Thank you, James!!!
--
MB


JamesDeckert said:
Check the sorting and grouping (toolbar button in design view of the report)
of the report which would reorder any query order.

hth,
James Deckert

MB said:
I have a database of training courses taken by our employees. It has a form
with a drop-down to select a specific employee for a report (rpt By Specific
Employee). Upon selection, the report appears in print-preview of that
specific employee. The record source of the report is a query (qry Specific
Employee). When this query is run from database view, it sorts correctly
(by course start date), but in the report, it sorts by Course name.

Before creating the drop-down form, the report sorted correctly by start
date. I can't figure out how a form would make a difference in the outcome
if no changes were made to the query.

The form name is frmEmployeeLocator and in the criteria of the query is:
[Forms]![FrmEmployeeLocator]![cboEmployeeName] under ENAME (employee name)
field.

There is no record source for the form. Does that make a difference? I do
have a macro (mcr Open Rpt - Specific Employee) next to the "On Click"
property of this form.

What am I missing?

Thanks so much for your help. I'm using Access 2007.


MB
 

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