S
Swim Dad
Hello,
Forgive me as I am a beginner trying to do something complicated. Using
Access 2003
I need some guidance on what would be the best way to achieve the following:
I would like to sum 2 fields (with conditions) and display the results in
another field on a form. I am currently using an update query.
All fields are in a table called "Source"
Sum or Result field is called "Total_Amount".
"Amount" and "Amount_1" are the names of the fields I would like to add
together and display the total in the "Total_Amount" field. Default values
for both are $0.00
"Date" field (companion with Amount) and "Date_1" field (companion with
Amount_1) are the conditional fields that when populated (not null) it is
okay to add together the "Amount" and "Amount_1" values and populate in
"Total_Amount"
I currently have this in an update query:
UPDATE Source SET Source.Total_Amount=Sum(IIf([Amount]<>"$0.00" and [Date]
is not null, [Amount]) + (IIf([Amount_1]<>"$0.00" and [Date_1] is not null,
[Amount_1])))
This code does not do anything that I can tell. At least it is not
populating the Total_Amount field.
Thanls
Swim Dad
Forgive me as I am a beginner trying to do something complicated. Using
Access 2003
I need some guidance on what would be the best way to achieve the following:
I would like to sum 2 fields (with conditions) and display the results in
another field on a form. I am currently using an update query.
All fields are in a table called "Source"
Sum or Result field is called "Total_Amount".
"Amount" and "Amount_1" are the names of the fields I would like to add
together and display the total in the "Total_Amount" field. Default values
for both are $0.00
"Date" field (companion with Amount) and "Date_1" field (companion with
Amount_1) are the conditional fields that when populated (not null) it is
okay to add together the "Amount" and "Amount_1" values and populate in
"Total_Amount"
I currently have this in an update query:
UPDATE Source SET Source.Total_Amount=Sum(IIf([Amount]<>"$0.00" and [Date]
is not null, [Amount]) + (IIf([Amount_1]<>"$0.00" and [Date_1] is not null,
[Amount_1])))
This code does not do anything that I can tell. At least it is not
populating the Total_Amount field.
Thanls
Swim Dad