Opening a report to a specific record

C

Carrie B

I have a 320 page report with an individual Item listed on each page of the
report. I have created a way to select an individual record to display on one
page of a report (done through a where statement I believe), however the page
number always says 1 of 1. Is there a way to change the page number to
reflect what the page number would be in the full report. i.e. page 56 of
320, even though its still just one page showing in the report???

Thanks
 
C

Clifford Bass

Hi Carrie,

There is if you have a way of knowing what the page number would be.
In which case, you could set it in the On Format event of the report header:

Page = 56

Clifford Bass
 
J

John Spencer

You need to know how many records in the large report and the relative
position of the individual item. You could probably use a DCount
Function to get that and set that as the value in the single page report.

Generic examples follow as the control sources

=DCount("*","SomeTableOrQuery")

The next thing you need to know is What position the individual item is
in the hierarchy.

Again DCount might be able to do that if you have some way to identify
the individual records position.

=DCount("*","SomeTableOrQuery","ItemID <='" [ItemID] & "'")

So, you can combine that into something like the following.

="Page " & DCount("*","SomeTableOrQuery","ItemID <='" [ItemID] & "'") &
" of " & DCount("*","SomeTableOrQuery") & " Pages"
'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
J

John Spencer

Whoops! left out an ampersand

Section should read:

Again DCount might be able to do that if you have some way to identify the
individual records position.

=DCount("*","SomeTableOrQuery","ItemID <='" & [ItemID] & "'")

So, you can combine that into something like the following.

="Page " & DCount("*","SomeTableOrQuery","ItemID <='" & [ItemID] & "'") & " of
" & DCount("*","SomeTableOrQuery") & " Pages"

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County

John said:
You need to know how many records in the large report and the relative
position of the individual item. You could probably use a DCount
Function to get that and set that as the value in the single page report.

Generic examples follow as the control sources

=DCount("*","SomeTableOrQuery")

The next thing you need to know is What position the individual item is
in the hierarchy.

Again DCount might be able to do that if you have some way to identify
the individual records position.

=DCount("*","SomeTableOrQuery","ItemID <='" [ItemID] & "'")

So, you can combine that into something like the following.

="Page " & DCount("*","SomeTableOrQuery","ItemID <='" [ItemID] & "'") &
" of " & DCount("*","SomeTableOrQuery") & " Pages"
'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================


Carrie said:
I have a 320 page report with an individual Item listed on each page
of the report. I have created a way to select an individual record to
display on one page of a report (done through a where statement I
believe), however the page number always says 1 of 1. Is there a way
to change the page number to reflect what the page number would be in
the full report. i.e. page 56 of 320, even though its still just one
page showing in the report???

Thanks
 
C

Carrie B

I counted the records in a SQL statement. Thanks John. Excellent idea.

John Spencer said:
Whoops! left out an ampersand

Section should read:

Again DCount might be able to do that if you have some way to identify the
individual records position.

=DCount("*","SomeTableOrQuery","ItemID <='" & [ItemID] & "'")

So, you can combine that into something like the following.

="Page " & DCount("*","SomeTableOrQuery","ItemID <='" & [ItemID] & "'") & " of
" & DCount("*","SomeTableOrQuery") & " Pages"

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County

John said:
You need to know how many records in the large report and the relative
position of the individual item. You could probably use a DCount
Function to get that and set that as the value in the single page report.

Generic examples follow as the control sources

=DCount("*","SomeTableOrQuery")

The next thing you need to know is What position the individual item is
in the hierarchy.

Again DCount might be able to do that if you have some way to identify
the individual records position.

=DCount("*","SomeTableOrQuery","ItemID <='" [ItemID] & "'")

So, you can combine that into something like the following.

="Page " & DCount("*","SomeTableOrQuery","ItemID <='" [ItemID] & "'") &
" of " & DCount("*","SomeTableOrQuery") & " Pages"
'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================


Carrie said:
I have a 320 page report with an individual Item listed on each page
of the report. I have created a way to select an individual record to
display on one page of a report (done through a where statement I
believe), however the page number always says 1 of 1. Is there a way
to change the page number to reflect what the page number would be in
the full report. i.e. page 56 of 320, even though its still just one
page showing in the report???

Thanks
 

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