i have an option field with options 1,2,3,4,5 and i have 10 textboxes which are bounded with global variable…
when i select the option as 1 and click a button the first two boxes are generated with a date difference of one month …similarly when i select the option as 2 and click a button the first four textboxes are generated with a date difference for ex
let the date be 02/02/02 and option is 1 then textboxes will range from 04/04/02-05/04/02
option is 2 then 04/04/02-05/04/02, 05/04/02-06/04/02
we are getting this by using case …
but once if i select 2 and again select 1
then also all 4 textboxes are enabling so i want only two textboxes …to be enabled…
I am pasting the code…
CASE “Cycle Number” OF
“Cycle Number”::“1”:
BEGIN
glbrecpay11:=“Start Date”;
glbrecpay12:=CALCDATE(‘1M’,glbrecpay11);
END ;
“Cycle Number”::“2”:
BEGIN
glbrecpay11:=“Start Date”;
glbrecpay12:=CALCDATE(‘1M’,glbrecpay11);
glbrecpay21:=glbrecpay12;
glbrecpay22:=CALCDATE(‘1M’,glbrecpay21);
END ;
END;
When you select option 2 and then option 1 there is nothing to clear the glbrecpay21 & glbrecpay22 variables. use a CLEAR command or assignment i.e. glbrecpay21:= 0D;