I have a report which lists all corrective action reports in the system, filtered by the year which the user selects when they open the report. Since the parameter requested by the report is "Year?", I apply an Iif sequence to the input in order to process it to a useable string for the report query.
[tt][CARyear] Like IIf(IsNull([Year?])=True,Year(Date()),IIf(Len([Year?])=2,"*" & [Year?],[Year?]))[/tt]
Thus the user can just hit enter to see the current year, or input the year in either 4- or 2-digit format. One of the fields pulled in the report query is the CARyear field, which is the 4-digit year of the report entry.
I have a subreport which I originally loaded in the report header, which pulls from a query which counts categories of CAR in each year in the data. This query also includes a 4-digit CARyear field, and this field is the one used to link the subreport to the main report. (I would think that this would mean that the above Iif statement would have no effect on the issue at hand, but I cannot see what the problem is, so I include the information just in case.)
In Access 2003, this works just fantastic. Unfortunately, my primary user for this report has a legacy system with Access 2000. In 2000, the subreport loads, but it shows the counts for EVERY year in the data. I tried creating a header for the CARyear sort group and displaying the subreport within that header, with no effect.
Can anyone tell me what is different in Access 2000 which leads to this issue? Is there a work-around?
Cheryl dc Kern
[tt][CARyear] Like IIf(IsNull([Year?])=True,Year(Date()),IIf(Len([Year?])=2,"*" & [Year?],[Year?]))[/tt]
Thus the user can just hit enter to see the current year, or input the year in either 4- or 2-digit format. One of the fields pulled in the report query is the CARyear field, which is the 4-digit year of the report entry.
I have a subreport which I originally loaded in the report header, which pulls from a query which counts categories of CAR in each year in the data. This query also includes a 4-digit CARyear field, and this field is the one used to link the subreport to the main report. (I would think that this would mean that the above Iif statement would have no effect on the issue at hand, but I cannot see what the problem is, so I include the information just in case.)
In Access 2003, this works just fantastic. Unfortunately, my primary user for this report has a legacy system with Access 2000. In 2000, the subreport loads, but it shows the counts for EVERY year in the data. I tried creating a header for the CARyear sort group and displaying the subreport within that header, with no effect.
Can anyone tell me what is different in Access 2000 which leads to this issue? Is there a work-around?
Cheryl dc Kern