How can I get a big "A" at the beginning of the A people, "B", etc

D

Dave N

I have a report in an Access database that we're using for Names, addresses,
phone numbers, and pictures. I have a good report to get the pictures to
work, thanks to all the help I received. Now I have a need for the simple
"Name Address Phone" report (no pictures) to show a big ---A--- at the
beginning of all the folks whose last names begin with A, and then ----B----
when the B people begin. Any idea on how to do that? If you're talking
about script or macro, please be simple and complete. I'm not an accoplished
script or macro writer...
 
D

Dale Fye

Modify your reports query to include a computed field:

FirstLetter:Left([LastName], 1)

Then group by that field in the report and make sure you add a group header.
Then put that field in the group header, and increase the font size
(probably set it to bold too).

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
D

Dave N

I put that expression as a "group by field" into the detail of the report and
before I even went to put it into the header, when I went to run the report,
I get an Access error: "Syntax error (comma) in query expression
'FirstLetter:Left([LastName], 1)'. I copied your expression right from the
email. I tried deleting the comma and got another syntax error (missing
operator) in the expression.

(What I did exactly was go to the report, design view, right clicked on the
detail part, went to sorting and grouping, pasted in the expression in the
field expression box (didn't have it as a pull down item, didn't know if I
had to add it to other tables or queries, told it to sort ascending, group
header yes, group footer no, group on (didn't know what to do there so made
it the default "each value"), group interval 1, keep together no)? I didn't
even get to start putting it into the header yet before I saved it and went
to view the report. What did I do wrong?)

Dale Fye said:
Modify your reports query to include a computed field:

FirstLetter:Left([LastName], 1)

Then group by that field in the report and make sure you add a group header.
Then put that field in the group header, and increase the font size
(probably set it to bold too).

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.



Dave N said:
I have a report in an Access database that we're using for Names, addresses,
phone numbers, and pictures. I have a good report to get the pictures to
work, thanks to all the help I received. Now I have a need for the simple
"Name Address Phone" report (no pictures) to show a big ---A--- at the
beginning of all the folks whose last names begin with A, and then ----B----
when the B people begin. Any idea on how to do that? If you're talking
about script or macro, please be simple and complete. I'm not an accoplished
script or macro writer...
 
L

Larry Linson

Doesn't read as if you did what Dale suggested, because you did not say that
you put the calculaltion in the query you are using as Record Source. The
expression, as Dale wrote it, is only valid to calculate a Field in a
Query... then you use the Field Name in Group By.

Larry Linson
Microsoft Office Access MVP

Dave N said:
I put that expression as a "group by field" into the detail of the report
and
before I even went to put it into the header, when I went to run the
report,
I get an Access error: "Syntax error (comma) in query expression
'FirstLetter:Left([LastName], 1)'. I copied your expression right from
the
email. I tried deleting the comma and got another syntax error (missing
operator) in the expression.

(What I did exactly was go to the report, design view, right clicked on
the
detail part, went to sorting and grouping, pasted in the expression in the
field expression box (didn't have it as a pull down item, didn't know if I
had to add it to other tables or queries, told it to sort ascending, group
header yes, group footer no, group on (didn't know what to do there so
made
it the default "each value"), group interval 1, keep together no)? I
didn't
even get to start putting it into the header yet before I saved it and
went
to view the report. What did I do wrong?)

Dale Fye said:
Modify your reports query to include a computed field:

FirstLetter:Left([LastName], 1)

Then group by that field in the report and make sure you add a group
header.
Then put that field in the group header, and increase the font size
(probably set it to bold too).

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.



Dave N said:
I have a report in an Access database that we're using for Names,
addresses,
phone numbers, and pictures. I have a good report to get the pictures
to
work, thanks to all the help I received. Now I have a need for the
simple
"Name Address Phone" report (no pictures) to show a big ---A--- at the
beginning of all the folks whose last names begin with A, and
hen ----B----
when the B people begin. Any idea on how to do that? If you're
talking
about script or macro, please be simple and complete. I'm not an
accoplished
script or macro writer...
 

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

Top