Have 3 text boxes and only one can be visible based on the field dept i.e AAA,BBB and CCC.
Three text boxes txtBodyText_1, txtBodyText_2 , txtBodyText_3
If Field data returns AAA then visible txtBodyText_1 and the others hidden.
If Field data returns BBB then visible txtBodyText_2 and the others hidden
If Field data returns CCC then visible txtBodyText_3 and the others hidden
have used on the visibility hidden text box properties :
txtBodyText_1:
=iif(Dept.value, "EmpDetails")="AAA",true,false)
txtBodyText_2:
=iif(Dept.value, "EmpDetails")="BBB",true,false)
txtBodyText_3:
=iif(Dept.value, "EmpDetails")="CCC",true,false)
Any ideas for a better solution...
If you switch your "=" to "<>" they should work as you intend.
=iif(Dept.value, "EmpDetails")<>"AAA",true,false)
Note that in the dialogs the property is named Visibility, but in the property window it is named Hidden. True = Hidden, False = Visible.
This equates to if Dept.value <> "AAA", Hide txtBodyText_1, else Show txtBodyText_1.