I want to add 12 month multiple Selection on form .while selection month how many month has been selection and count the month , so i can calculate further calculation.
Pls provide me C/side code .for the same.
in check box
if i select jan and feb ,it should count 2
Thanks in advance
Could you please explain exactly what it that you’re trying to do. I really don’t understand what you’ve been writing here?
var : months - boolean
i - integer
count - decimal
make checkbox - assign it with months for January, next checkbox - assign it with months for February, and so on.
count := 0;
for i = 1 to 12 do
if months [ i ] = TRUE then count += 1;
that’s the idea.
Looks good Joe, but I still don’t understand what it is that this should be used for.
Eric, not sure also what’s his purpose. But I just giving the pseudo-code. [:)]
Hi Erik & joe,
Maybe he is creating some thingey where a user can split a cost over x months, and at the same time give the user possibility to, at runtime, define wich months it should be split into.
Instead of doing a loop to calculate “count”, he could also keep track of it when validating month[x].
This would call for code to be put in more places, but will on the other hand let “count” be available at any time.
Thanks to all for giving me your valueable time .
Hi Erik & joe,
I am Developing Student Fees Colleciton form for primary school . so i created one array variable for 12 month and put 12 checkbox on form and sourceExpr give as cMonthArray,cMonthArray,cMonthArray …etc, and set caption of January,February,March …etc.
for e.g. Student given two month fees then user can click on january and february … so when user save the record i am making one string for all selected month in this case - January,February and stored in fmonthname field.
my problem is …now when user click next , previous button then checkbox should make true automatic for respective month. from reading the fmonthname field.