K
K E Senthil Kumar
Hello,
I am using access forms to create an application using VBA. I use a main
form and 3 sub forms. In one form i use a field no_of_days. I want to use
the value in this filed to use a divide a sum on another subform. However,
the value is always coming as zero and divide by zero error occurs, even
though the value is 2.
the main form is called main, the first form form1 and 2nd form as form2. In
form2, i use the following code
nd = val(no_of_days)
total = val(filed1)+val(field) / nd
but this brings up always the divide by zero error. What am i doing wrong.
I tried to pass the value by naming it as
nd = val(forms!form1.for!no_of_days),
but this also is not working.
Any help would be appreciated
thanks
kesk
I am using access forms to create an application using VBA. I use a main
form and 3 sub forms. In one form i use a field no_of_days. I want to use
the value in this filed to use a divide a sum on another subform. However,
the value is always coming as zero and divide by zero error occurs, even
though the value is 2.
the main form is called main, the first form form1 and 2nd form as form2. In
form2, i use the following code
nd = val(no_of_days)
total = val(filed1)+val(field) / nd
but this brings up always the divide by zero error. What am i doing wrong.
I tried to pass the value by naming it as
nd = val(forms!form1.for!no_of_days),
but this also is not working.
Any help would be appreciated
thanks
kesk