Grouping ?

  • Thread starter Thread starter Ty
  • Start date Start date
T

Ty

I need to do a report and Group it by the company, here
is the catch I need to group the "A", "B", "C"... etc. I
am not terribly great at reporting in Access.

For example:

"A"

Adam Ltd.
Apples Inc.

"B"

Bob's Landscape
Brenda's Cookies

"C"

Cookies for you and me
Cooking with Martha

Thanks for any help.

Ty
 
Very easy.

1. Open your report in design view.

2. Open the Sorting And Grouping Dialog (View menu).

3. Choose the Company name in the Field/Expression column of the dialog.
Access adds a "Company Header" section to the report.
In the lower pane, change these properties:
Group Header Yes
Group Footer Yes
Group On Prefix Characters
Group Interval 1

4. Add a text box to th Company Header section.
Set its ControlSource to:
=Left([Company], 1)

The text box gives you the index letter.
The Group Header causes the grouping by each character.
The Group Footer gives you spacing between sections.

Note that if you have no companies starting with a character (e.g. "X"), the
letter will not appear.
 
There is probably an easier way, but in your query create
a new field Alpha:Left([ClientName],1). This will return
the first letter of the client name. You can then group
on that. The only problem with this is if you have
leading blank spaces.
 
Allen you are brilliant !!!!!

Now last question can I start a NEW page everytime the
alphabet changes - i.e. all the "A"'s then NEW page for
ALL the "B"'s... etc

THank you !!!

Ty
-----Original Message-----
Very easy.

1. Open your report in design view.

2. Open the Sorting And Grouping Dialog (View menu).

3. Choose the Company name in the Field/Expression column of the dialog.
Access adds a "Company Header" section to the report.
In the lower pane, change these properties:
Group Header Yes
Group Footer Yes
Group On Prefix Characters
Group Interval 1

4. Add a text box to th Company Header section.
Set its ControlSource to:
=Left([Company], 1)

The text box gives you the index letter.
The Group Header causes the grouping by each character.
The Group Footer gives you spacing between sections.

Note that if you have no companies starting with a character (e.g. "X"), the
letter will not appear.

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

Reply to group, rather than allenbrowne at mvps dot org.
I need to do a report and Group it by the company, here
is the catch I need to group the "A", "B", "C"... etc. I
am not terribly great at reporting in Access.

For example:

"A"

Adam Ltd.
Apples Inc.

"B"

Bob's Landscape
Brenda's Cookies

"C"

Cookies for you and me
Cooking with Martha

Thanks for any help.

Ty


.
 
Sure.

Right-click the Company Group Header, and choose Properties.
Set the Force New Page property to Before.

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

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

Ty said:
Allen you are brilliant !!!!!

Now last question can I start a NEW page everytime the
alphabet changes - i.e. all the "A"'s then NEW page for
ALL the "B"'s... etc

THank you !!!

Ty
-----Original Message-----
Very easy.

1. Open your report in design view.

2. Open the Sorting And Grouping Dialog (View menu).

3. Choose the Company name in the Field/Expression column of the dialog.
Access adds a "Company Header" section to the report.
In the lower pane, change these properties:
Group Header Yes
Group Footer Yes
Group On Prefix Characters
Group Interval 1

4. Add a text box to th Company Header section.
Set its ControlSource to:
=Left([Company], 1)

The text box gives you the index letter.
The Group Header causes the grouping by each character.
The Group Footer gives you spacing between sections.

Note that if you have no companies starting with a character (e.g. "X"), the
letter will not appear.

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

Reply to group, rather than allenbrowne at mvps dot org.
I need to do a report and Group it by the company, here
is the catch I need to group the "A", "B", "C"... etc. I
am not terribly great at reporting in Access.

For example:

"A"

Adam Ltd.
Apples Inc.

"B"

Bob's Landscape
Brenda's Cookies

"C"

Cookies for you and me
Cooking with Martha

Thanks for any help.

Ty
 
Back
Top