I have a control on a report, what I'd like to do is display the text "PAL"
if the content/value of the text/control is equal to -1, if the control's
value is 0, then, show "SFSV"
Is this possible? If it is how does one get it done?
Thanks,
dkalsow - 13 Jan 2005 17:37 GMT
Jay,
You can do this a couple of ways:
1) have a query be the control source for the report. In the query create a
new field and use the iff function like this: Newfield:
IIf([sourcefield]=-1,""PAL" ,"SFSV")
2) hide the current field on the report and create a new field and set the
new fields source to: =IIf([sourcefield]=-1,""PAL" ,"SFSV")
3) hide the current field and create a new field then in the format section
of the report write an event procedure that will check the current field and
then set the new field based upon the vale that is in the current field.
Something like:
if txtcurrentfield = -1 then
txtnewfield="PAL"
else
txtnewfield="SFSV"
end if
Hope this helps.
Dale
> I have a control on a report, what I'd like to do is display the text "PAL"
> if the content/value of the text/control is equal to -1, if the control's
[quoted text clipped - 3 lines]
>
> Thanks,
Jay - 13 Jan 2005 19:39 GMT
Dale:
Thanks, I think that this will work, just fine! Appreciate the assistance!
> Jay,
>
[quoted text clipped - 29 lines]
> >
> > Thanks,
Marshall Barton - 13 Jan 2005 20:24 GMT
>I have a control on a report, what I'd like to do is display the text "PAL"
>if the content/value of the text/control is equal to -1, if the control's
>value is 0, then, show "SFSV"
Another way that does not require any code/expressions is to
set the text box's Format property to a custom format. In
this case:
;"PAL";"SFSV"

Signature
Marsh
MVP [MS Access]