Can someone help me in retrieving a report that has a subreport that requires the date to be the same as the main records and -1 and -2 years.
what i have is
stDocName = "SUM_DIRECT_OPS_ALLOC"
subformfilter = "[OPS_FY] = [Please Enter Fiscal Year]"
subformfilterFE = "fe_fy = [ops_FY] or fe_fy = [ops_FY]-1 or fe_fy = [ops_FY]-2"
subformfilterRED = "RED_FY = [OPS_FY] or RED_FY = [OPS_FY]+1 or RED_FY = [OPS_FY]+2"
DoCmd.OpenReport stDocName, acPreview
' this retrieve the main report on what ever the fiscal year is
Reports!SUM_DIRECT_OPS_ALLOC.Filter = subformfilter
Reports!SUM_DIRECT_OPS_ALLOC.FilterOn = True
' not sure why this subreport filter isn't working, i thought i write it similar to how i would retrieve a subform
Reports![SUM_DIRECT_OPS_ALLOC]![SUM_DIRECT_FE_ALLOC].Report.Filter = subformfilterFE
Reports![SUM_DIRECT_OPS_ALLOC]![SUM_DIRECT_FE_ALLOC].Report.FilterOn = True