Hi,
I have one issue that I don't understand. In my table I have fields like total, jan, feb, mar, apr, may,...,dec and all these fields I set its datatype as double and precision as auto.
In my form, I have use before update action to each input text box with condition as :
when I insert with these data :
total=15080
jan=feb=mar=0
apr=1072.96
may=2602.958
jun=2628.958
jul=2504.958
aug=2504.958
sep=2505.958
oct=1160.25
nov=99
it suddenly popup message "exceed total" when I input 99 to nov text box. But when I use msgbox to popup each value and its sum, it is 15080.
Could anybody tell me how to compare double datatype ?
Sophanna
I have one issue that I don't understand. In my table I have fields like total, jan, feb, mar, apr, may,...,dec and all these fields I set its datatype as double and precision as auto.
In my form, I have use before update action to each input text box with condition as :
Code:
if(nz(me.jan,0)+nz(me.feb,0)+nz(me.mar,0)+nz(me.apr,0)+nz(me.may,0)+nz(me.jun,0)+nz(me.jul,0)+nz(me.aug,0)+nz(me.sep,0)+nz(me.oct,0)+nz(me.nov,0)+nz(me.dec,0)) >me.total then msgbox "exceed total"
total=15080
jan=feb=mar=0
apr=1072.96
may=2602.958
jun=2628.958
jul=2504.958
aug=2504.958
sep=2505.958
oct=1160.25
nov=99
it suddenly popup message "exceed total" when I input 99 to nov text box. But when I use msgbox to popup each value and its sum, it is 15080.
Could anybody tell me how to compare double datatype ?
Sophanna
Comment