Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group records in a report based on a "from to range".

Status
Not open for further replies.

Trogg

IS-IT--Management
Feb 13, 2003
80
US
I know this must be simple but I've gone brain dead. I have a query that returns the names of employers and number of employees they have. I need to make a report that groups the employers by a from to range of number of employees like this:

Num of Employees
0-50
Acme Corp
Xyz, Inc

51-100
Bowman Group
PC Supplies, INC

101-150
Etc
Etc

Thanks in advance for your help...
 
Your grouping and sorting dialog can use an expression like:
=([NumOfEmps] -1)\50
Make sure you use "\" and not "/"

Duane
MS Access MVP
 
Thanks Duane,

I believe that will work... now how can I get it to do the group headers as they change? (0-50, 51-100, 101-150, etc.)

Thanks
 
Try modify the grouping expression like:
=(([NumOfEmps]-1)\50)*50 & " - " & (([NumOfEmps]-1)\50+1)*50
There might be a simpler expression...

Duane
MS Access MVP
 
Thanks Duane... I can make this work for the user... not exactly what she wants but its close enough.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top