A little help please.
I have a form where i select a contract number(cbocmsref and a month(cbofldate). Once selected i hit a button and my report opens. i want the main repor tot be as per cbocmdref (i got this part working) and the sub report criteria to be as per the cbofldate on the form.
Each contract can either be quarterly or monthly. if quarterly i want the criteria on the subreport to be cbofldate and the next two months after it. If the contract is monthly then i only want the criteria to eb cbofldate.
I've tried putting this iif statement in the date criteria but does not work.
Thanks

I have a form where i select a contract number(cbocmsref and a month(cbofldate). Once selected i hit a button and my report opens. i want the main repor tot be as per cbocmdref (i got this part working) and the sub report criteria to be as per the cbofldate on the form.
Each contract can either be quarterly or monthly. if quarterly i want the criteria on the subreport to be cbofldate and the next two months after it. If the contract is monthly then i only want the criteria to eb cbofldate.
I've tried putting this iif statement in the date criteria but does not work.
Code:
IIf(forms!frmrepfilter5!cbocmsref.column(2)="Quarterly",(TblFuelLevy.FLDate)=forms!frmrepfilter5!cbofldate And (TblFuelLevy.FLDate)=DateAdd("m",1,forms!frmrepfilter5!cbofldate) And (TblFuelLevy.FLDate)=DateAdd("m",2,forms!frmrepfilter5!cbofldate),forms!frmrepfilter5!cbofldate)
Thanks