Saving filters as queries in VB?

Tawcan

Registered User.
Local time
Today, 00:38
Joined
Mar 19, 2003
Messages
58
Not sure if this is the place to post this since the question/problem involves filter, query, report, and VB... :o

Ok I have a database which contains bunch student records in different years. So a report on student progress can be 1-5 pages long. Before I was trying to manipulate the display field so I can specify which page I want to view on the report. Then have 5 reports, displaying different years.

Got that to work using the following code in the report:

Private Sub Report_Open(Cancel As Integer)
Me.RecordSource = Forms![INDIVIDUAL APR]!Box2
Me.Filter = "YEAR='1'"
Me.FilterOn = True

End Sub

The RecordSource basically opens up the table that contains all the student records.

Now... I'm trying to create a main report and put these 5 reports on there so I can display everything on 1 page (using subreport). This is where I am having problems. When I tried to view the main report, Access would give me this : " The setting you entered is not valid for this property." At first I thought it had something to do with the report sharing the same table and multiple subreports, but the same error still happens when I have only 1 subreport on the main report.

Could someone tell me how I could solve this problem? So close of getting what I want but now I'm stuck once again. :o

Thanx for the helps. :)
 

Users who are viewing this thread

Back
Top Bottom