Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I convert checkbox data into text description?

Status
Not open for further replies.

bricklebrit

Technical User
Mar 2, 2002
26
US
Hello,

When generating a report, I have a check box true/false value for the item [Sampler].

When I generate my report, instead of shows the checkbox next to the item [Sampler]. If the checkbox is true, I want to generate a text line reading "I've included the sampler in your package". If the checkbox is false, I can just skip over it.

Could anybody out there tell me how to set up a simple script to do this?

Thanks in advance for you assistance!
Jon
 
you need to code an iif statement for the control source of the text box:

=iif([check box field name] = -1, "I've included the sampler in your package","")
 
Hi John,

Thanks for the prompt response -- it works great!! :)

On the same report, I'm trying to develop a code that says the number of CDs based off the value [NumCD].

If its just one CD, it should read 'this CD'
If its more than 1 CD, I should say 'these ___ CDs'

Based of the code you've given me, I've coded this out, the syntax if definately wrong and I can't seem to get through it:

=iff((Sum[NumCD]) > 1 ,"these " & (Sum[NumCD]) & " CDs","this cd")

Thanks for any insight you might have and thanks again for all the help!
Jon
 
Try this:

=iif((Sum[NumCD]) > 1 ,"these " & (Sum[NumCD]) & " CDs","this cd")

You will have to use this in a footer to get the Sum. If you don't, you will just det the sum of the detail.
 
Hi John,

I'm trying out:

=iif((Sum[NumCD]) > 1 ,"these " & (Sum[NumCD]) & " CDs","this cd")

I'm actually get a sytax error claiming that I've 'entered an operand without an operator' -- any ideas?

Thanks,
Jon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top