finding the difference between values in text boxes

bakerboy_1111

Registered User.
Local time
Today, 17:05
Joined
Dec 1, 2003
Messages
43
This is most likely the easiest thing to do but I CAN'T DO IT!!!!

I have two text boxes, "Tot_Length" and "Cap". I wish to subtract "Tot_Length" from "Cap". I've tried the following in the control source:

=[Cap]-[Tot_Length]

This does not work. If I put just =[Tot_Length] then it returns the right value, it just doesn't seem to be able to take the difference.

Is there a special way to do subtraction?

Thanks to anyone who helps.
 
So you're not getting the right answer, but what do you get? Do you get #Name? Do you get 0?
 
Thanks for your replies,

I've set them up as fixed numbers. I've made sure all boxes are set to this.

Also, the error I get is "#Error" in the box.
 
baker,

Is this calculating on the same boxes that I added to your form previously, or is it another form all together?
 
G'day brad,

Yeh, it's the same form, I think I've renamed the text boxes though.
 
Rough and dirty ;)

You will get the idea I think.

I added the iif to avoid the #error when cmbDrums is Null.

Your logic is correct re: =[control1] - [control2]

I would suggest that you have possibly mucked up the txtBox names, or your cmbDrums being Null is causing the prob.

HTH

Brad.
 

Attachments

Oops,

Just remembered that you didn't post this publically last time.

If you do not want it to remain posted, please let me know, and I will remove it.

Cheers

Brad.
 
Thanks again Brad, you've helped me out yet again.

I suppose it doesn't matter about the file being public, after all these forums are about sharing info, right?

thanks again,

Bakerboy
 

Users who are viewing this thread

Back
Top Bottom