EXTREMELY URGENT REQUEST... Re: Grouping

  • Thread starter Thread starter Joe Blow
  • Start date Start date
J

Joe Blow

First, a big THANK YOU to everyone who helps out here.

I am running Access XP/2002, with a db in Access 2000 format.

I have created a report and am having troubles with the grouping. I am aware
of the "Force New Page", "Before" option.

I am trying to get a group/page break with specific criteria.

ie:

Field1 in Table1 contains numbers between 0 and 99999. The field type is set
to "Number"

I want to group/pagebreak with the following criteria...

Group1: 00000-19999

Group2: 20000-25999

Group3: 26000-39999

Group4: 40000-49999

Group5: 50000-59999

Group6: 60000-79999

Group7: 80000-99999

I tried intervals, but the intervals are not consistent, so that didn't
work.

The only thing I can get it to do even close, is to group each set of
records that have identical values, then Force Page Break after each set.

Any help would be greatly appreciated.

Thanks

Joe Blow
 
Open the Sorting and Grouping window, create a new group and put in
Field/Expression field:

=Switch([number]<=19999,1,[number]<25999,2,[number]<39999,3,[number]<49999,4,[number]<59999,5,[number]<79999,6,[number]<99999,7,true,8)

Change the [number] to the name of your field.

for this line, turn the Group Header On.

Mauricio Silva
 
I am getting an error message when I tried that...

The expression you entered contains invalid syntax.
You omitted an operand or operator, you entered an invalid character or
comma, or you entered text without surrounding it in quotation marks.

Does it matter that there's a space in the field name?

SLS REP ?

Joe


Mauricio Silva said:
Open the Sorting and Grouping window, create a new group and put in
Field/Expression field:

=Switch([number]<=19999,1,[number]<25999,2,[number]<39999,3,[number]<49999,4,[number]<59999,5,[number]<79999,6,[number]<99999,7,true,8)

Change the [number] to the name of your field.

for this line, turn the Group Header On.

Mauricio Silva

Joe Blow said:
First, a big THANK YOU to everyone who helps out here.

I am running Access XP/2002, with a db in Access 2000 format.

I have created a report and am having troubles with the grouping. I am
aware
of the "Force New Page", "Before" option.

I am trying to get a group/page break with specific criteria.

ie:

Field1 in Table1 contains numbers between 0 and 99999. The field type is
set
to "Number"

I want to group/pagebreak with the following criteria...

Group1: 00000-19999

Group2: 20000-25999

Group3: 26000-39999

Group4: 40000-49999

Group5: 50000-59999

Group6: 60000-79999

Group7: 80000-99999

I tried intervals, but the intervals are not consistent, so that didn't
work.

The only thing I can get it to do even close, is to group each set of
records that have identical values, then Force Page Break after each set.

Any help would be greatly appreciated.

Thanks

Joe Blow
 
What is the exact syntax you tried?

--
Duane Hookom
MS Access MVP


Joe Blow said:
I am getting an error message when I tried that...

The expression you entered contains invalid syntax.
You omitted an operand or operator, you entered an invalid character or
comma, or you entered text without surrounding it in quotation marks.

Does it matter that there's a space in the field name?

SLS REP ?

Joe


Mauricio Silva said:
Open the Sorting and Grouping window, create a new group and put in
Field/Expression field:

=Switch([number]<=19999,1,[number]<25999,2,[number]<39999,3,[number]<49999,4,[number]<59999,5,[number]<79999,6,[number]<99999,7,true,8)

Change the [number] to the name of your field.

for this line, turn the Group Header On.

Mauricio Silva

Joe Blow said:
First, a big THANK YOU to everyone who helps out here.

I am running Access XP/2002, with a db in Access 2000 format.

I have created a report and am having troubles with the grouping. I am
aware
of the "Force New Page", "Before" option.

I am trying to get a group/page break with specific criteria.

ie:

Field1 in Table1 contains numbers between 0 and 99999. The field type is
set
to "Number"

I want to group/pagebreak with the following criteria...

Group1: 00000-19999

Group2: 20000-25999

Group3: 26000-39999

Group4: 40000-49999

Group5: 50000-59999

Group6: 60000-79999

Group7: 80000-99999

I tried intervals, but the intervals are not consistent, so that didn't
work.

The only thing I can get it to do even close, is to group each set of
records that have identical values, then Force Page Break after each
set.

Any help would be greatly appreciated.

Thanks

Joe Blow
 
=Switch([SLS REP]<=19999,1,[SLS REP]<25999,2,[SLS REP]<39999,3,[SLS
REP]<49999,4,[SLS REP]<59999,5,[SLS REP]<79999,6,[SLS REP]<99999,7,true,8)





Duane Hookom said:
What is the exact syntax you tried?

--
Duane Hookom
MS Access MVP


Joe Blow said:
I am getting an error message when I tried that...

The expression you entered contains invalid syntax.
You omitted an operand or operator, you entered an invalid character or
comma, or you entered text without surrounding it in quotation marks.

Does it matter that there's a space in the field name?

SLS REP ?

Joe


Mauricio Silva said:
Open the Sorting and Grouping window, create a new group and put in
Field/Expression field:

=Switch([number]<=19999,1,[number]<25999,2,[number]<39999,3,[number]<49999,4,[number]<59999,5,[number]<79999,6,[number]<99999,7,true,8)

Change the [number] to the name of your field.

for this line, turn the Group Header On.

Mauricio Silva

:

First, a big THANK YOU to everyone who helps out here.

I am running Access XP/2002, with a db in Access 2000 format.

I have created a report and am having troubles with the grouping. I am
aware
of the "Force New Page", "Before" option.

I am trying to get a group/page break with specific criteria.

ie:

Field1 in Table1 contains numbers between 0 and 99999. The field type
is set
to "Number"

I want to group/pagebreak with the following criteria...

Group1: 00000-19999

Group2: 20000-25999

Group3: 26000-39999

Group4: 40000-49999

Group5: 50000-59999

Group6: 60000-79999

Group7: 80000-99999

I tried intervals, but the intervals are not consistent, so that didn't
work.

The only thing I can get it to do even close, is to group each set of
records that have identical values, then Force Page Break after each
set.

Any help would be greatly appreciated.

Thanks

Joe Blow
 
Duane,

I too am having similar problems and the expression given here worked but I
also wanted to put text indentifying what group it was into each header. Can
you help?

Duane Hookom said:
What is the exact syntax you tried?

--
Duane Hookom
MS Access MVP


Joe Blow said:
I am getting an error message when I tried that...

The expression you entered contains invalid syntax.
You omitted an operand or operator, you entered an invalid character or
comma, or you entered text without surrounding it in quotation marks.

Does it matter that there's a space in the field name?

SLS REP ?

Joe


Mauricio Silva said:
Open the Sorting and Grouping window, create a new group and put in
Field/Expression field:

=Switch([number]<=19999,1,[number]<25999,2,[number]<39999,3,[number]<49999,4,[number]<59999,5,[number]<79999,6,[number]<99999,7,true,8)

Change the [number] to the name of your field.

for this line, turn the Group Header On.

Mauricio Silva

:

First, a big THANK YOU to everyone who helps out here.

I am running Access XP/2002, with a db in Access 2000 format.

I have created a report and am having troubles with the grouping. I am
aware
of the "Force New Page", "Before" option.

I am trying to get a group/page break with specific criteria.

ie:

Field1 in Table1 contains numbers between 0 and 99999. The field type is
set
to "Number"

I want to group/pagebreak with the following criteria...

Group1: 00000-19999

Group2: 20000-25999

Group3: 26000-39999

Group4: 40000-49999

Group5: 50000-59999

Group6: 60000-79999

Group7: 80000-99999

I tried intervals, but the intervals are not consistent, so that didn't
work.

The only thing I can get it to do even close, is to group each set of
records that have identical values, then Force Page Break after each
set.

Any help would be greatly appreciated.

Thanks

Joe Blow
 
A long time ago, I was using a DB program that forced me to change my
regional settings in Windows.
The Windows default "List Separator" needed to be changed from a comma to a
semi-colon.
(Don't ask me why...)

I switched it back to a comma, and now the expression works.

Thanks for the help everyone.

Joe



Duane Hookom said:
What is the exact syntax you tried?

--
Duane Hookom
MS Access MVP


Joe Blow said:
I am getting an error message when I tried that...

The expression you entered contains invalid syntax.
You omitted an operand or operator, you entered an invalid character or
comma, or you entered text without surrounding it in quotation marks.

Does it matter that there's a space in the field name?

SLS REP ?

Joe


Mauricio Silva said:
Open the Sorting and Grouping window, create a new group and put in
Field/Expression field:

=Switch([number]<=19999,1,[number]<25999,2,[number]<39999,3,[number]<49999,4,[number]<59999,5,[number]<79999,6,[number]<99999,7,true,8)

Change the [number] to the name of your field.

for this line, turn the Group Header On.

Mauricio Silva

:

First, a big THANK YOU to everyone who helps out here.

I am running Access XP/2002, with a db in Access 2000 format.

I have created a report and am having troubles with the grouping. I am
aware
of the "Force New Page", "Before" option.

I am trying to get a group/page break with specific criteria.

ie:

Field1 in Table1 contains numbers between 0 and 99999. The field type
is set
to "Number"

I want to group/pagebreak with the following criteria...

Group1: 00000-19999

Group2: 20000-25999

Group3: 26000-39999

Group4: 40000-49999

Group5: 50000-59999

Group6: 60000-79999

Group7: 80000-99999

I tried intervals, but the intervals are not consistent, so that didn't
work.

The only thing I can get it to do even close, is to group each set of
records that have identical values, then Force Page Break after each
set.

Any help would be greatly appreciated.

Thanks

Joe Blow
 
A more robust solution would not use a long Switch() function. I would
expect the values to change over time and there is no excuse for creating a
solution that would require someone to find the Switch() function and change
the values.

Better solutions would use either a single function that returns the
appropriate value or a lookup table with the ranges of values stored in a
table.

--
Duane Hookom
MS Access MVP
--

Joe Blow said:
A long time ago, I was using a DB program that forced me to change my
regional settings in Windows.
The Windows default "List Separator" needed to be changed from a comma to
a semi-colon.
(Don't ask me why...)

I switched it back to a comma, and now the expression works.

Thanks for the help everyone.

Joe



Duane Hookom said:
What is the exact syntax you tried?

--
Duane Hookom
MS Access MVP


Joe Blow said:
I am getting an error message when I tried that...

The expression you entered contains invalid syntax.
You omitted an operand or operator, you entered an invalid character or
comma, or you entered text without surrounding it in quotation marks.

Does it matter that there's a space in the field name?

SLS REP ?

Joe


message
Open the Sorting and Grouping window, create a new group and put in
Field/Expression field:

=Switch([number]<=19999,1,[number]<25999,2,[number]<39999,3,[number]<49999,4,[number]<59999,5,[number]<79999,6,[number]<99999,7,true,8)

Change the [number] to the name of your field.

for this line, turn the Group Header On.

Mauricio Silva

:

First, a big THANK YOU to everyone who helps out here.

I am running Access XP/2002, with a db in Access 2000 format.

I have created a report and am having troubles with the grouping. I am
aware
of the "Force New Page", "Before" option.

I am trying to get a group/page break with specific criteria.

ie:

Field1 in Table1 contains numbers between 0 and 99999. The field type
is set
to "Number"

I want to group/pagebreak with the following criteria...

Group1: 00000-19999

Group2: 20000-25999

Group3: 26000-39999

Group4: 40000-49999

Group5: 50000-59999

Group6: 60000-79999

Group7: 80000-99999

I tried intervals, but the intervals are not consistent, so that
didn't
work.

The only thing I can get it to do even close, is to group each set of
records that have identical values, then Force Page Break after each
set.

Any help would be greatly appreciated.

Thanks

Joe Blow
 
Back
Top