473,503 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

conditional calculation

6 New Member
hi, i am beginner in access , Just created simple database and trying to figure out correct way to calculate. please help
name Amount Action
a 1 Deposit
b 2 withdraw
c 3 transfer
d 4 deposit
e 5 Transfer
f 6 withdraw

Total =Sum ((IIf[Action]="Deposit", [Amount], 0))

Here I wanted above formula to give me (a + d) instead the formula gives
(a+d)- (b+e)
Apr 7 '07 #1
3 1636
rdawadiuk
6 New Member
My reports looks like below, and calculation is in report footer

name....Amount....Action
a......... 1.............. Deposit
b......... 2 .............withdraw
c......... 3.............. transfer
d........ 4.............. deposit
e ........5............. Transfer
f ........6...............withdraw

thanks
Apr 7 '07 #2
MMcCarthy
14,534 Recognized Expert Moderator MVP
hi, i am beginner in access , Just created simple database and trying to figure out correct way to calculate. please help
name Amount Action
a 1 Deposit
b 2 withdraw
c 3 transfer
d 4 deposit
e 5 Transfer
f 6 withdraw

Total =Sum ((IIf[Action]="Deposit", [Amount], 0))

Here I wanted above formula to give me (a + d) instead the formula gives
(a+d)- (b+e)
Formula should be ...

Expand|Select|Wrap|Line Numbers
  1. =Sum(IIf([Action]="Deposit", [Amount], 0))
Apr 10 '07 #3
NeoPa
32,557 Recognized Expert Moderator MVP
I would have said :
Expand|Select|Wrap|Line Numbers
  1. =Sum(IIf([Action]="Deposit", [Amount], -[Amount]))
Apr 12 '07 #4

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

Similar topics

5
2348
by: John Baker | last post by:
Hi: I have a field that i wish to use the conditional format capability on, and for some reason it wont work. The field is a a text box: =- I would like to make it red when negative, and...
92
9768
by: Raghavendra R A V, CSS India | last post by:
hie.. Do any one knows how to write a C program without using the conditional statements if, for, while, do, switch, goto and even condotional statements ? It would be a great help for me if...
5
2188
by: phillyon | last post by:
I have a query listing: Date, Session Length, StaffName1, StaffName2, StaffName3 I'd like the next column to be Total Staff Hours, being a straightforward calculation of length x the number of...
5
2662
by: buddyr | last post by:
I have one table in microsoft access database. I need to perform calculation on a field- then a conditional statement between 2 fields. field2 - needs to be multiplied by 5 the answer needs to...
1
2308
by: GMAN36 | last post by:
I have a problem which may be simple to solve...not sure (teaching myself Access using Access 2002). I have a field that performs the calculation =* however, sometimes the item is not taxable. ...
0
7086
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
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.