Need help

Tawcan

Registered User.
Local time
Today, 00:43
Joined
Mar 19, 2003
Messages
58
Hi,

Say I have a report that's 10 pages.... is it possible to display only a certain page (ie page 2 only) on the report view? If so how could I do this?

Thanx.
 
There is a Pages Collection which has Page as the Object ... and then you can specify the number of the page you actually wanna see ... its same concept as Forms Collection ...


Tawcan said:
Hi,

Say I have a report that's 10 pages.... is it possible to display only a certain page (ie page 2 only) on the report view? If so how could I do this?

Thanx.
 
Where is "Pages Collecction" under? I can't seem to find the control anywhere. :o
 
How would you know ahead of time which page(s) you wanted to display? If you want to limit the output to particular records, use either the filter or where arguement of the OpenReport Method. If you want to print specific page ranges or multiple copies, use the PrintOut Method.
 
The report can range from 2 - 6 pages.

Ok I found a way to do this by using filter....but I'm not very good with VB coding...please help.

Right now the code is:

Me.FilterOn=True
Me.Filter = " conditions/criterias "

In the table that the report reads, there are fields such as YEAR, REQ COURSES, SESSION, GRADES, etc.

For my condition I want YEAR = 1, YEAR = 2, YEAR = 3, GRADE < 50 % or Grade = " F " and so on...

But when I do
Me.Filter= "YEAR=2"

Access complains about the code.... could someone help me on how I could set the conditions/criterias for the filter using VB code? Also how do I use AND, OR and stuff like that on coding?

How do you use OpenReport/PrintOut methods?

Me.PrintOut= "2" - > page 2 ?

:confused:

Thanx. :)
 
I think you will have an easier time if you use the where argument of the OpenReport Method rather than using the filter within the report's code module.

You can formulate the where argument depending on what selection you need. BTW, if you really have a field named YEAR, chang it to something else. Year is the name of a function.

strWhere = "(myYEAR = 1 OR myYEAR = 2 OR myYEAR = 3) AND (GRADE < '50' or Grade = 'F')"
 
Hmmm so if I use OpenReport I can limit to which page I want to view? (not print, view).

Tried using filter again but doesn't seem to work..

I did:

Private Sub Report_Open(Cancel As Integer)
Me.RecordSource = Forms![INDIVIDUAL APR]!Box2
Me.Filter = GRADES < "50"
Me.FilterOn = True
End Sub

When I tried running the program Access complained that the Me.Filter line contains no value. :confused:

Also tried
Private Sub Report_Open(Cancel As Integer)
Me.RecordSource = Forms![INDIVIDUAL APR]!Box2
Me.Filter = ([Forums![INDIVIDUAL APR]!Box2].GRADES < "50")
Me.FilterOn = True
End Sub

This time it tells me that [ cannot be found... take out the [ ] and it says missing object. :confused: :confused: :confused:
 
Nm I got it. :p

It's Me.Filter="GRADES < '50' "

:D
 
Hmmm filter seems to work with my reports...

But when I use the subreport properties to show these reports on a main report page, Access complains about the filter conditions.... " The setting you entered isn't valid for this property"

Any idea why? :confused:
 

Users who are viewing this thread

Back
Top Bottom