Sub Reports

NUWildcat

Registered User.
Local time
Today, 05:33
Joined
Apr 16, 2002
Messages
17
I have a sub report located in a report but they are based on the same query. I have it set up so that when I open my report from a different form, the report is filtered by some given input data. I cannot find a way to get the sub report to be filtered at the same time with the same criteria though. The sub report will only link to the main report using the master and child fields and willl not use the filtered query. Does anyone have any ideas?
 
Not to be obtuse, but if both the main report and the sub report are based off the same query, why do you have a subreport? Totals/grouping?

Anyway, I think you can do what you want with a popup form. Input the filtering data into unbound text boxes on your popup form, then refer to those text boxes when you filter your data in the query. This topic addresses a similar situation: http://www.access-programmers.co.uk/ubb/Forum3/HTML/003461.html

HTH,
David R
 
The reason for the sub report is because of visual purposes. The report is a resume and because i have a vertical bar on the left side of the page with other information in it I couldnt list the information I needed in the detail section because I had assumed that it would need to go across the whole page. If this is wrong and theres another way to do it, that would be great. And so the sub report is in there to provide the option of showing more than one record. When I tried just having three text boxes for this information it would only show the one record and not go through multiple job experiences. Thanks for the help, Ill try what you said and let you know if it worked.
 
Also what is a pop up form? Sorry, Im kind of new to this program. Thanks so much for the help.
 
A popup form in this case is just a term for a form that doesn't (usually) tie into any table or query, but allows you to do something as an intermediate step.

For example, if you go to run a query and put parameters into it (like Between [Enter start date:] And [Enter end date:]), Access pops up with input boxes for each one, THEN it runs the query. You could do this instead by having a button on your switchboard to run the query. The button doesn't actually start the query but starts a popup form with two boxes on it to enter the dates, then uses those values to run the query.

I'm probably giving you more information than you need to to accomplish what you are doing. Please post back if you have specific problems or post a new topic.

Good luck,
David R
 
I guess my biggest problem is that I have exactly what I want the report to do and look like except for one last part. the resume has a name bar on top and a list of education and experiences along the left bar. What I want my sub report to do is go through a list of different projects and jobs that each person has been working on and thandisplay those that are of a certain type which is given by the database user. The query is filtered through a form which gives the options for person and project types and than in VBE it compiles a string that is the query criteria i.e. [Name ID] = 2 and [Substation Design] = True.
Than using the OpenReport "ReportName", acPreview, , String
it opens the report in its filtered form. All the information for the main report is filtered perfectly as it is just the information for each given person but I need to find a way to have the subreport only list projects for the given types. As it is now it just shows all the projects for each person since it is matched Master and Child links through the Name ID. I have gotten it to show what I want when I go through and manually type out the given filter string into the subreports filter field, but it will not link this filter field to my filter string and input it automatically. Ive tried using VB code to somehow get it to update the filter but it gives me weird messages and when I link it through the properties menu the screen shows up blank.
Do you have any sugestions to try. I guess another question is that I put in text boxes to directly enter the data into the main report bu it will not act like it does in the Detail section and will only list one of my records and not all of the projects of that type. If theres a way to get it to look at all the records than the information is already filtered on the main report.
Sorry this is so long and that I keep pestering you. I tried to use the Pop-Up forms but I couldnt really figure out how to get it to do what I want.
Thank you again so much
 

Users who are viewing this thread

Back
Top Bottom