Help with grouping and sorting

R

Randy

MS ACCESS 2000. I have a report that I need to group by employee [EID] but
sort by the employees total hours [TotalHours]. I have a group header of
EID which does fine grouping the employee ID and total hours, but I can not
get the employee total hours to sort from highest to lowest hours. Example:
I need. Thanks
EID Total Hours
3045 40
2051 42.1
3021 50.1
2021 55.9
 
S

strive4peace

you cannot sort by a calculated control

if you want to sort by a total, make a query that calculated
the total hours for each EID and join it to your recordset

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
R

Randy

Iv'e noticed that my query will calculate the total for each employee if I
dont include the date field with a Between clause in the criteria. But I do
need a date range, it will not group with a date range. Any ideas?

strive4peace said:
you cannot sort by a calculated control

if you want to sort by a total, make a query that calculated the total
hours for each EID and join it to your recordset

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
MS ACCESS 2000. I have a report that I need to group by employee [EID]
but sort by the employees total hours [TotalHours]. I have a group
header of EID which does fine grouping the employee ID and total hours,
but I can not get the employee total hours to sort from highest to lowest
hours. Example: I need. Thanks
EID Total Hours
3045 40
2051 42.1
3021 50.1
2021 55.9
 
S

strive4peace

try
= #1/1/06# and <= #3/1/06#

instead of using BETWEEN


no, you cannot GROUP on a date range... but you can group on
any calculated field in the underlying recordset -- why do
you want to group on a range?

in the Grouping and Sorting dialog box, you can choose to
group by year, month, or other part of a date

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
Iv'e noticed that my query will calculate the total for each employee if I
dont include the date field with a Between clause in the criteria. But I do
need a date range, it will not group with a date range. Any ideas?

you cannot sort by a calculated control

if you want to sort by a total, make a query that calculated the total
hours for each EID and join it to your recordset

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
MS ACCESS 2000. I have a report that I need to group by employee [EID]
but sort by the employees total hours [TotalHours]. I have a group
header of EID which does fine grouping the employee ID and total hours,
but I can not get the employee total hours to sort from highest to lowest
hours. Example: I need. Thanks
EID Total Hours
3045 40
2051 42.1
3021 50.1
2021 55.9
 
R

Randy

This didnt work either, I need the date range to show the hours worked by
employees in a particular date range. I want to know the average hours per
employee so I can make adjustment to high hour employees. Thanks, Randy
strive4peace said:
try
= #1/1/06# and <= #3/1/06#

instead of using BETWEEN


no, you cannot GROUP on a date range... but you can group on any
calculated field in the underlying recordset -- why do you want to group
on a range?

in the Grouping and Sorting dialog box, you can choose to group by year,
month, or other part of a date

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
Iv'e noticed that my query will calculate the total for each employee if
I dont include the date field with a Between clause in the criteria. But
I do need a date range, it will not group with a date range. Any ideas?

you cannot sort by a calculated control

if you want to sort by a total, make a query that calculated the total
hours for each EID and join it to your recordset

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*

Randy wrote:

MS ACCESS 2000. I have a report that I need to group by employee [EID]
but sort by the employees total hours [TotalHours]. I have a group
header of EID which does fine grouping the employee ID and total hours,
but I can not get the employee total hours to sort from highest to
lowest hours. Example: I need. Thanks
EID Total Hours
3045 40
2051 42.1
3021 50.1
2021 55.9
 
S

strive4peace

Hi Randy,

can you provide more details about how you are limiting your
records? are you using a report filter? using criteria in
the underlying recordset?

thank you

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
This didnt work either, I need the date range to show the hours worked by
employees in a particular date range. I want to know the average hours per
employee so I can make adjustment to high hour employees. Thanks, Randy
try

= #1/1/06# and <= #3/1/06#

instead of using BETWEEN


no, you cannot GROUP on a date range... but you can group on any
calculated field in the underlying recordset -- why do you want to group
on a range?

in the Grouping and Sorting dialog box, you can choose to group by year,
month, or other part of a date

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
Iv'e noticed that my query will calculate the total for each employee if
I dont include the date field with a Between clause in the criteria. But
I do need a date range, it will not group with a date range. Any ideas?

"strive4peace" <"strive4peace2006 at yahoo dot com"> wrote in message


you cannot sort by a calculated control

if you want to sort by a total, make a query that calculated the total
hours for each EID and join it to your recordset

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*

Randy wrote:


MS ACCESS 2000. I have a report that I need to group by employee [EID]
but sort by the employees total hours [TotalHours]. I have a group
header of EID which does fine grouping the employee ID and total hours,
but I can not get the employee total hours to sort from highest to
lowest hours. Example: I need. Thanks
EID Total Hours
3045 40
2051 42.1
3021 50.1
2021 55.9
 

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

Similar Threads

Sorting Dates 14
Dates 1
Sorting Dates 8
Labour Report Help 1
Sorting and Grouping issue 2
Sorting Dates 14
Group Totals in Report 7
how do I sum computed fields in access 3

Top