S
S Green
Hi I am wondering if someone could please advise me on the following:
Below are two examples of iif statements driving two of many fields in a rec
query I have created. You will note the dates for the period are hard coded.
I would like to have the date as a variable which is prompted for when the
query is run, rather than having to hard code it in expression builder.
CurrentPeriod:
IIf([Data]![Source]="Source1",IIf([Data]![ReportingDate]=#31/03/2008#,[Data]![Amount],"0"),"0")
PriorPeriod:
IIf([Data]![Source]="Source1",IIf([Data]![ReportingDate]=#29/02/2008#,[Data]![Amount],"0"),"0")
I would really appreciate any advise people can provide to me around this.
Many Thanks
Below are two examples of iif statements driving two of many fields in a rec
query I have created. You will note the dates for the period are hard coded.
I would like to have the date as a variable which is prompted for when the
query is run, rather than having to hard code it in expression builder.
CurrentPeriod:
IIf([Data]![Source]="Source1",IIf([Data]![ReportingDate]=#31/03/2008#,[Data]![Amount],"0"),"0")
PriorPeriod:
IIf([Data]![Source]="Source1",IIf([Data]![ReportingDate]=#29/02/2008#,[Data]![Amount],"0"),"0")
I would really appreciate any advise people can provide to me around this.
Many Thanks