Telephone Book Format

  • Thread starter Thread starter LCalaway
  • Start date Start date
L

LCalaway

Hello, All
I would like to prepare a report in Telephone Book format where there are
spaces between the main sections. After all surnames beginning with the
letter A there would be a wider space before those names beginning with the
letter B would begin to print. And so on.

Can someone please aim me at a knowledgebase, etc for the code?

Thank you.
LCalaway
 
Hello,

This is very easy to do. Once you have the rpeort laid out
in continuous format...

Turn on the Sorting & Grouping window

from the menu --> View, Sorting and Grouping

if you already have defined Surname as a sort field, you
will need to insert a row above it...

click on the gray box to the left of the line and press the
INSert key on your keyboard

In field/expression, choose Surname

in the lower pane

GroupHeader --> Yes
GroupOn --> Prefix characters
GroupInterval --> 1

this will create a group header for the letter

make a textbox control
Name --> Letter
ControlSource --> = Left(Surname,1)

format the letter to be bigger and bold

the space above each section will be determined by where you
place your calculated control

the space below each letter is determined by the height of
the group section

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
 
LCalaway said:
Hello, All
I would like to prepare a report in Telephone Book format where there are
spaces between the main sections. After all surnames beginning with the
letter A there would be a wider space before those names beginning with
the letter B would begin to print. And so on.

Can someone please aim me at a knowledgebase, etc for the code?

I won't tell you "Google is your friend." although some reasonable use of
http://groups.google.com on this and other newsgroups would probably give
you all you need to know on the subject.

(1) if you want multiple columns in your phonebook, File | Page Setup and
find multiple columns which I'd guess you would want in "Down then Across"
mode.

(2) in the Query you create to be RecordSource, include a Calculated Field,
which you might define as
FirstChar: Left$([LastName],1)

(3) in design view of the Report, click on the upperleftmost little square,
choose Sorting and Grouping, and group on the FirstChar, specifying that you
want a Group Header.

(4) the Group Header could contain either the letter from First Char or
nothing, but will provide the opportunity to make some space.

Uh, oh! I'm sorry, you wanted "code". This does it without any code, except
for the expression in the Calculated Field. I hope you'll forgive me. <GRIN>

Larry Linson
Microsoft Access MVP
 
Thank you -- this works wonderfully...as you knew it would <GRIN><GRIN>
LCalaway


Larry Linson said:
LCalaway said:
Hello, All
I would like to prepare a report in Telephone Book format where there are
spaces between the main sections. After all surnames beginning with the
letter A there would be a wider space before those names beginning with
the letter B would begin to print. And so on.

Can someone please aim me at a knowledgebase, etc for the code?

I won't tell you "Google is your friend." although some reasonable use of
http://groups.google.com on this and other newsgroups would probably give
you all you need to know on the subject.

(1) if you want multiple columns in your phonebook, File | Page Setup and
find multiple columns which I'd guess you would want in "Down then Across"
mode.

(2) in the Query you create to be RecordSource, include a Calculated
Field, which you might define as
FirstChar: Left$([LastName],1)

(3) in design view of the Report, click on the upperleftmost little
square, choose Sorting and Grouping, and group on the FirstChar,
specifying that you want a Group Header.

(4) the Group Header could contain either the letter from First Char or
nothing, but will provide the opportunity to make some space.

Uh, oh! I'm sorry, you wanted "code". This does it without any code,
except for the expression in the Calculated Field. I hope you'll forgive
me. <GRIN>

Larry Linson
Microsoft Access MVP
 

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

Back
Top