I have a gut feeling this is a relatively simple thing to do, just can't quite get where to do / program it...
Basic data structure: We have Projects, and each Project has multiple Estimates.
I have a "main" report for each Project/Estimate - i.e., each page would be for Proj 1, Est 1; Proj 1, Est 2; Proj 2, Est 1; Proj 3, Est 1, etc.
The subreport is tied to the main report by Project # and lists summary info for the Estimates of the Project. I want to filter the subreport to show *only* Estimate summary lines for Estimates = or < the current Esimate #. Currently, as it is tied to the main report by Project # and there is no filter, previous Estimates show summary lines for *all* Estimates.
The report only works properly if you look only at the "now" information. If you enter Estimate 3 for a Project and run a report, you'll get all the summary lines for Est's 1-3. However, if you go back to Est 2 (say the customer lost their copy of this page and want a reprint), you have summary lines for Est's 1-3 on the report for Est 2. Doesn't seem "right" to me.
I figured some sort of filter, or using VBA to set the RecordSource to something like "SELECT [Est summary fields] FROM [Estimate table] WHERE [Estimate Number] <= " & Me.Estimate Numer " (paraphrased - not my actual SQL), but I can't figure out where to insert this.
Any suggestions/help would be greatly appreciated. Thanks much!
Start Free Trial