Re: How can I put dictionary-style page headers in an Access report?



On Thu, 23 Aug 2007 09:50:01 -0700, qumranandy wrote:

My dictionary is formatted as one big table with three columns - the Greek
words at left in Greek alphabetical order, the biblical Hebrew phrase
including the material which the Greek word helps translate at the right, and
in the middle is the Greek phrase that translates the Hebrew if the
translation is not exact. How can I get the dictionary headers at the top?
(First Greek word and last Greek word on the page).
Fincke

"DataGear" wrote:

In word you can use StyleRef to create dictionary-style page headers, but I
can seem to find a way to do the same in an Access Report.

Let's assume the name of the field is "GreekWord".

The PageHeader has access to the first detail record.
So to show the first record on each page all you need do is to place
the [GreekWord] control in the header.
Whatever the first record on the page is will be shown in the Header.

To show the last Greek Word in the Page Header requires a little work.
Add a new table to the database.
ID Field (AutoNumber No Duplicates)
FinalGreekWord (Text)
Name the table 'tblPageHeader'

For the first record in the table enter a space (or anything)
in the FinalGreekWord field.
Continue adding records (by adding a space in the FinalGreekWord field
for as many pages as you expect the report to have,
incrementing the ID field by 1 each record.
So if you expect 20 pages, make 20+ records.
(This can be done using code, but that would be another post.)

In the Report, add a control to compute [Pages].
If you don't already have one
= [Page] & " of " & [Pages]
will do.

Then add a control in the Page Header where you
wish to display the final Greek word on the page:
=DLookUp("[FinalGreekWord]","tblPageHeader","[ID] = " & [Page])


The Page Footer has access to the last Detail record.
Code the Report's PageFooter Format event:

CurrentDb.Execute "Update tblPageHeader Set FinalGreekWord = " &
Chr(34) & [GreekWord] & Chr(34) & "Where [ID] = " & [Page],
dbFailOnError

Note: The above should be all on one line, or split using the Space
Underscore combination.

Run the report.
The [Pages] control forces the report to be formatted twice.
On the first pass, the table is updated after each page
with the final Greek word on that page.
Then the report is displayed and the DLookUp in the Page Header
control reads the corresponding page name from the table.

Worked fine for me the last time I ran it.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
.



Relevant Pages

  • Re: How can I put dictionary-style page headers in an Access repor
    ... How do I reformat my document from table format to ... (First Greek word and last Greek word on the page). ... can seem to find a way to do the same in an Access Report. ... the control in the header. ...
    (microsoft.public.access.reports)
  • Re: How can I put dictionary-style page headers in an Access repor
    ... How do I reformat my document from table format to ... (First Greek word and last Greek word on the page). ... can seem to find a way to do the same in an Access Report. ... the control in the header. ...
    (microsoft.public.access.reports)
  • Line Spacing on report export
    ... Exporting a report, from table, not query. ... header line prints OK, next line is first record prints OK ... A blank line shows up after first record and then after every ... Does the same if I remove page header, does the same font size at ...
    (microsoft.public.access.reports)
  • Re: From and To in Report Header
    ... > in the header as to what is on that particular page. ... > the report page. ... So to show the first record on each page all you need do is to place ... add a control to compute. ...
    (microsoft.public.access.reports)
  • Re: Help!
    ... >associated with the first record in the report. ... Anything in the page header ... >is associated with the first record on the page. ... >> register of the details. ...
    (microsoft.public.vb.crystal)

Loading