Subtract numbers from the same field

hunoob

Registered User.
Local time
Yesterday, 21:07
Joined
Feb 17, 2009
Messages
90
Hi there Everyone! As I am very new to access please try to help me if you can. I have a field (field A) which contains numbers. In the field B I would like to get the result of the subtraction of the last two numbers of field A.

Example:

field A.......field B
3...............-
4...............1
6...............2

What formula I have to write in the update query of field B?

Thank you in advance!
 
as being a newbie with this, you've jumped into something more advnaced. I would advise that you use Excel to do this first as an experiment., unless you are an expert coder in VBA interspersing this with SQL in queries, which is a tough task in general
 
Multiple numbers in the same field?
If so, how are they delineated? Or, perhaps, do you mean digits?

Evan
 
Example:

field A.......field B
3...............-
4...............1
6...............2
Or do you mean the last 2 records as your description looks like a table?
 
1. You do NOT want to store data in your table of this sort.

2. Because the data is not really stored in any meaningful sort order (it tries by primary key but with new records added, deleted ones, etc. it will not stay without compacting frequently).

3. You apply a sort in a query and then you can use a function to do this. But again, you do not want to store this information in a table. There are no "triggers" in Access and so if one number gets modified manually or somehow bypasses any other process, then your values are no longer valid.
 

Users who are viewing this thread

Back
Top Bottom