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



On Fri, 24 Aug 2007 08:30:00 -0700, qumranandy wrote:

Thanks, Fred.
Now I know what "It's Greekl to me" means. Here's what Word help says about
"Dictionary Stle Headers":
Format the names in the document by using a paragraph (paragraph style: A
combination of character- and paragraph-formatting characteristics that are
named and stored as a set. You can select a paragraph and use the style to
apply all of the formatting characteristics to the paragraph at one time.) or
character style (character style: A combination of any of the character
formatting options identified by a style name.). Insert two STYLEREF fields
in the document header."
I have no idea what "detail record", "field code", "Report" mean. So let's
try at the beginning. How do I reformat my document from table format to
paragraph format, so I can use the Word help solution? Or, let's just stick
with your advice and use the first word for the page-header. How do I assign
the contents of column 1 to a "field"? And then what does "The Pageheader
has access to the first detail record" mean?

"fredg" wrote:

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


I'm confused.

You apparently are attempting to use Microsoft Word.
Please ignore my reply to your previous post.

You posted your question to the wrong newsgroup.
The access in this groups name refers to Microsoft Access, a database
program.

Please repost your original question to the correct newsgroup for the
Word program you are using. I would suggest you include your Windows
and Office version number in the message.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
.



Relevant Pages

  • Re: Page numbers with multiple sections breaks on the page
    ... Executive Summary (with a footer with page numbers i, ii, etc.), the main ... report format that we can use as a template for all our reports. ... Word keeps the settings of the previous section's header in the new one-- ...
    (microsoft.public.word.pagelayout)
  • 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: Page numbers with multiple sections breaks on the page
    ... Word keeps the settings of the previous section's header in the new one-- ... numbers in the main body of the report, which has a different number format ... I am experimenting with report formats by starting with an old Word 2002/XP ... get a format we are happy with I plan to create a Word 2007 template for it. ...
    (microsoft.public.word.pagelayout)
  • notepad formatting
    ... can't get them in another format) and I want to copy and paste to Word. ... match the text of the report) and I am unable to change the spacing on ... A large part of my problem is that there is a header on each ... page of the report and I need to format my final word file so that the ...
    (microsoft.public.word.docmanagement)
  • Re: How can I put dictionary-style page headers in an Access report?
    ... (First Greek word and last Greek word on the page). ... can seem to find a way to do the same in an Access Report. ... Whatever the first record on the page is will be shown in the Header. ...
    (microsoft.public.access.reports)