Products A-Z All Services Can't find what you're looking for? Chat Live!
Products A-Z Can't find what you're looking for? Chat Live!
Can't find what you're looking for? Chat Live!
I'm trying to create a statement like this:
if {CnSmryGft_2.CnSmryGft_2_Total_Gift_amount}=0 then ". Thank you for completing your parent pledge." else " leaving a balance of {CnSmryGft_2.CnSmryGft_2_Total_Gift_amount}. Pledge payments received by June 15, 2008 is greatly appreciated."
The first statement works but for the else statement it does not seem to recognize the {CnSmryGft_2.CnSmryGft_2_Total_Gift_amount} as a field rather it prints as a text.
That's because everything within the quotes (") is treated as text. You'll need to concatenate the static strings with the field. Also, all parts of a concatenation need to be compatible types, so you'll need to convert the amount to a string. It will need to be something like
"leaving a balance of " + CStr({CnSmryGft_2.CnSmryGft_2_Total_Gift_amount}) + ". Pledge payments received by June 15, 2008 are greatly appreciated."
CStr() has a couple of different options that allow you to control the formatting of the result. You may want to look at the help on that function.
I also corrected the agreement in the second sentence. "Payments" is plural, so the verb has to be plural, too.
Drew