Group:  Microsoft Access ยป microsoft.public.access.reports
Thread: How can I get a big "A" at the beginning of the A people, "B", etc

Geek News

How can I get a big "A" at the beginning of the A people, "B", etc
Dave N 12/30/2008 6:58:02 PM
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...


RE: How can I get a big "A" at the beginning of the A people, "B", etc
Dale Fye 12/30/2008 7:31:00 PM
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" wrote:

[Quoted Text]
> 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...
>
>
RE: How can I get a big "A" at the beginning of the A people, "B",
Dave N 12/30/2008 11:00:04 PM
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" wrote:

[Quoted Text]
> 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" wrote:
>
> > 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...
> >
> >
Re: How can I get a big "A" at the beginning of the A people, "B",
"Larry Linson" <bouncer[ at ]localhost.not> 12/31/2008 3:05:00 AM
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" <DaveN[ at ]discussions.microsoft.com> wrote in message
news:417E1365-1DB6-4DAE-B0AB-B75CB9BAA30E[ at ]microsoft.com...
[Quoted Text]
>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" wrote:
>
>> 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" wrote:
>>
>> > 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...
>> >
>> >


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net