By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,930 Members | 1,383 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,930 IT Pros & Developers. It's quick & easy.

subtract from field

100+
P: 250
i have a form that shows text boxes with different values, and i would like when a button is clicked for '1' to be subtracted from the total of one of those text boxes.... thanks for your help
Jan 7 '10 #1
Share this Question
Share on Google+
4 Replies


missinglinq
Expert 2.5K+
P: 3,532
What do you want to happen if the textbox is empty or Null when the button is clicked?

And if the textbox is at 0 (zero) when the button is clicked, do you want to go into negative numbers?

Linq ;0)>
Jan 7 '10 #2

100+
P: 250
the textbox will not be null at least i would have no reason for it to be... it would just be at 0 and yeah negative numbers would be good... thanks
Jan 7 '10 #3

NeoPa
Expert Mod 15k+
P: 31,492
As you share no details I will have to invent names for you. You can update it to match your own names I expect :
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdSubtract
  2.     Me.ATextBox = Nz(Me.ATextBox, 0) - 1
  3. End Sub
Jan 7 '10 #4

100+
P: 250
ok great yeah i think that should work, ill try it out and let you know... thanks!
Jan 8 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.