My report has a text Box which has a Control source based on a series of IIf Statements as follows:
The statement is fine if I reduce the number of IIf Statements (I think 12 is the maximum) but I need to have all of these arguments in complete the report.
I have a feeling that it might be possible to use a VBA statement using the "On Print" event from the Detail header, but I can't find a way of building it.
Any help would be much appreciated.
Thanks a lot
John
Code:
= IIf ([type]="chambre" and [position]=1,"chambre", IIf ([type]="chambre" and [position]=2,"vulture ",
IIf ([type]="mersey" and [position]=1,"mersey",
IIf ([type]="tyne" and [position]=1,"tyne", IIf ([type]="tyne" and [position]=2,"clover ",
IIf ([type]="turtle" and [position]=1,"turtle", IIf ([type]="turtle" and [position]=2,"cornwall",
IIf ([type]="centenary" and [position]=1,"president",
IIf ([type]="nailman" and [position]=1,"nailman",
IIf ([type]="golden trigger" and [position]=1,"golden trigger",
IIf ([type]="cock" and [position]=1,"cock", IIf ([type]="cock" and [position]=2,"tappet hen",
IIf([Type]="fibua" And [position]=1,"Thames",
IIf([Type]="M8" And [Position]=1,"V. Elvedon ",
IIf([Type]="Roberts" And [position]=1,"D of Westminster",
IIf([Type]="Roupell" And [Position]=1,"Graham","")))))))))))))
I have a feeling that it might be possible to use a VBA statement using the "On Print" event from the Detail header, but I can't find a way of building it.
Any help would be much appreciated.
Thanks a lot
John