Parameter Query

K

Karen

I created a parameter query.
I have the following in the date field:
Between [Beginning Date] And [Ending Date]

and the following in the employee field:
[Please Enter Employee Name]

How can I do a primary sort by date in ascending order
and then a secondary sort by another field?

I know that I can click sort (ascending or descending) in
the query, but how will it know which field is primary
and which is secondary? If it matters, I want to use
this query to set up a report. Should I do the sorting
in the report wizard?

HELP!
 
G

Guest

Hi Karen

Sorts work from left to right so you need to order the fields in the query
accordingly. However, you may find it easier to do in the report wizard.
HTH
 
G

Guest

hi,
by default access follows sort orders left to right.
meaning the primary sort(date) should be the far left
field in the query grid. the sort in the second field from
the left would be the secondary sort and so on.
 
K

Karen

Thank you for your help - If I run the query and (for
instance) I filter out a certain employee, I don't want
to show a field with only the employee name, I know I can
uncheck the "show" check box. But, I won't know which
employee it is. Is it possible to be able to not show
the employee field and have the empoyee's name displayed
in the report header automatically?
-----Original Message-----
Hi Karen

Sorts work from left to right so you need to order the fields in the query
accordingly. However, you may find it easier to do in the report wizard.
HTH


Karen said:
I created a parameter query.
I have the following in the date field:
Between [Beginning Date] And [Ending Date]

and the following in the employee field:
[Please Enter Employee Name]

How can I do a primary sort by date in ascending order
and then a secondary sort by another field?

I know that I can click sort (ascending or descending) in
the query, but how will it know which field is primary
and which is secondary? If it matters, I want to use
this query to set up a report. Should I do the sorting
in the report wizard?

HELP!
.
 
F

fredg

I created a parameter query.
I have the following in the date field:
Between [Beginning Date] And [Ending Date]

and the following in the employee field:
[Please Enter Employee Name]

How can I do a primary sort by date in ascending order
and then a secondary sort by another field?

I know that I can click sort (ascending or descending) in
the query, but how will it know which field is primary
and which is secondary? If it matters, I want to use
this query to set up a report. Should I do the sorting
in the report wizard?

HELP!

Access sorts fields in left to right order.
Make sure your primary field is placed before the secondary field.
You can simply select and drag the columns (in design view).

Be aware, however, that any sort done in the query is irrelevant to
the sort done in a report.
To properly sort your report, use the Report's sorting and grouping
dialog. In Report Design View:
View + Sorting and Grouping
 
F

fredg

Thank you for your help - If I run the query and (for
instance) I filter out a certain employee, I don't want
to show a field with only the employee name, I know I can
uncheck the "show" check box. But, I won't know which
employee it is. Is it possible to be able to not show
the employee field and have the empoyee's name displayed
in the report header automatically?
-----Original Message-----
Hi Karen

Sorts work from left to right so you need to order the fields in the query
accordingly. However, you may find it easier to do in the report wizard.
HTH


Karen said:
I created a parameter query.
I have the following in the date field:
Between [Beginning Date] And [Ending Date]

and the following in the employee field:
[Please Enter Employee Name]

How can I do a primary sort by date in ascending order
and then a secondary sort by another field?

I know that I can click sort (ascending or descending) in
the query, but how will it know which field is primary
and which is secondary? If it matters, I want to use
this query to set up a report. Should I do the sorting
in the report wizard?

HELP!
.

If all you want to do is have the name that was used as criteria in
the [Please Enter Employee Name] prompt show in the Report Header,
simply add an unbound control to the Report Header, set it's control
source to something like:
="Employee name " & [Please Enter Employee Name]

The text within the brackets must be identical to the bracketed text
in the 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