473,406 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

subtract from field

266 256MB
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
4 2331
missinglinq
3,532 Expert 2GB
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
didacticone
266 256MB
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
32,556 Expert Mod 16PB
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
didacticone
266 256MB
ok great yeah i think that should work, ill try it out and let you know... thanks!
Jan 8 '10 #5

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

Similar topics

3
by: Russ Green | last post by:
I'm trying to perform several manipulations to time values (all will be stored in a access database). I need to find the elapsed time between a start time and a finish time and I also need to be...
8
by: dlx_son | last post by:
Here is the code so far <form name="thisform"> <h3>Enter time to add to or subtract from:</h3> (If not entered, current time will be used)<br> Day: <input name="d1" alt="Day of month"...
3
by: Mo | last post by:
Is it possible to subtract a number of weeks from a specific date field in one of my queries? e.g: CalculatedDateField: MyDatefield - 10 wks Any help much appreciated.
2
by: vnl | last post by:
I need to create a report or field that will show the difference between a customer's balance on two different dates for every customer in our database (for example, see below: I need the...
4
by: Lee | last post by:
Hi All, I have a datetime field and want to subtract 24 (or any other number of) hours from it. How would I go about this? Thanks Lee
3
by: S. van Beek | last post by:
Dear reader, With DatePart() you can subtract the year or the week from a date field with: DatePart("yyyy";) for the year
8
by: Remington | last post by:
I am using windows 2000pro with access 2000. I am trying to make a database for our HR department, that would allow our HR Director to type in an employee's ID number into a form and then select...
15
klarae99
by: klarae99 | last post by:
I am working on an Inventory Database in Access 2003. I am working on a report that I could print when its time to file our State Sales Tax paperwork. The figures I need for this report are Total...
1
by: andy143vivi | last post by:
hi, i have a query from 5 tables, and i want to make one of the field to subtract the value from another field, sample: field1: field2: 5 2 4 ...
1
by: Marvstyles | last post by:
I wanna take 300 and subtract it by a value inside a field and i want the results to display in a new field called "Oustanding Fees." The field is called "FeesPaid" and the field contains the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.