Addressing separate pages on a report

  • Thread starter Thread starter Marcel Stoop
  • Start date Start date
M

Marcel Stoop

Hi

On every page of a report I have to check the value of a Field, depending on
that value I have to make an other field visible or invisible.
For that I need to address every page to check the value of that specific
field.

Is it possible to address every page and checking the value of a field on
that page.

Thanks for the help

Marcel
 
I know that I have to use the Format Event

What I do not know is, how to Address every single page on the report.

Cheers

Marcel
 
That event is triggered as each page is being formatted so by using it
you are addressing every single page.

HTH
 
I guess we do not really understand each other.
- Report consist of 20 pages
- The field on which I have to check is: txtX
- On every single page of the report txtX could have a different value
- As soon as the value of txtX changes I have to make field txtY visible
- If the value of txtX does not changes field txtY should be invisible

So for checking the value of txtX I have to check every single page of the
report.
On page 1, txtX could have the value 1. On page 2, txtX could have the value
2

So in Code I need to build something like:
For N = 1 TO (total of pages)
If...... Then
.........
End If
Next N

Problem is: How do I address for instance Page 4 to check what value txtX
has got on this page

Thanks again for the help
 
You haven't locked onto the idea that the Format event is fired for
each page as it's about to be formatted for print or preview.. You
don't need the For ... Next. Treat it as a single page. You just
need the single If ... Then ... Else ... End If.

Acces's Help in 2000 is still pretty good, in 2003 not so good (or
maybe I haven't used help in 2003 enough to be good at it). If you
bring up your report in design view and select the Page then you'll
see an On Format window. Click the 2 dot ellipsis on the right and
Access will start a sub procedure for you on the Report's module. Put
that single If ... Then ... Else ... Endif in that procedure and fire
for effect. Every section of a report can have a Format event so be
sure you have the right one.

HTH
 
With

Dim intX As Integer
intX = Page Mod 2

If intX = 0 Then
' even pages
Else
' uneven pages
End If

It is posible to address the even and uneven pages of a report

If you say "the Format event is fired for each page", does that mean, that
it is not possible to address every single page of the report
I can't use a singele If ... Then ... Else ... End If.
because I have to compair value txtX o n every page with the previuos page

Marcel
 
I've gone about as far as I want to go on this one. Maybe someone
else will pick it up or you could start a new thread. You asked a
question and had great difficulty accepting that the answer you
received really addressed the question you asked. I assume that
you've discovered that the answer did address the question correctly
since you no longer dwell on that question but have brought another
one to the fore.

You're welcome and good luck.
 
Sorry to be blunt but,
- you had difficulty in answering my question (Either you do not understand
my question, or you do not know an answer)
- The answer you gave had nothing to do with the question. It was just the
first step to take
- If you would read carefully the thread you would notice, that I did not
bring up another question. It was just an example that it is possible to
address a specific kind of set of pages on a report.

In future I would recommend that if you do not really understand the
question, or you simple do not know the answer you just honestly say it,
then I can either do my best to rephrase the question or look for another
place to get some help.

Cheers
Marcel

(I guess you are not a MVP)
 
Your posts and my answers bear out my observations.

My motivation in answering peoples posts in these newsgroups is to
help them.

As to helping YOU in the future, I won't.
 

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