1 person found this helpful
What event do you have your code on ......I woudl put it on the calculate event .....that will fire when any of the fields named in the calc change.
I had the code in the "click" event. I moved it to the calculate event and it works better --when a change is made to one of the numeric fields, the textfield goes blank until the checkbox is clicked again. (Instead of the numbers not changing at all until the checkbox is cleared and rechecked)
Here is the code on the check box:
form1.ItemWorksheet.CheckBox1::calculate - (FormCalc, client)
(this.rawValue == "1") then
= Concat(NumericField1, " of ", NumericField2, " items.")
= " "
I guess using a checkbox for this is the problem, the checkbox will always put an instance of the concatenated value in the textfield. If the fields that make up that text are changed, the checkbox needs to reset and be clicked again to put the new instance in. Maybe if the checkbox could toggle the visibility of the of the concatenated text?
I will go with keeping the code on the calculate event and add instruction for the user, "if you change these fields re-click the checkbox"
Thanks for the help!
What if you just added an else portion to your statement .....if you get into th eelse that means that the checkbox is off or zero.