Calculated column in query (1 Viewer)

moi

Member
Local time
Today, 18:05
Joined
Jan 10, 2024
Messages
202
Good day sirs,
Pls i need help, i wanted to add calculated column to my query, adding 3 columns.. What i have is "totalpayments:([reservation]+[downpayment]
+[amountpaid])" . But it give me blank.. Is this not working in access?.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 06:05
Joined
May 21, 2018
Messages
8,529
If any value is null then it will become null. You might have to wrap each part
totalpayments: nz([reservation],0) +nz([downpayment],0) + nz([amountPaid],0)
 

moi

Member
Local time
Today, 18:05
Joined
Jan 10, 2024
Messages
202
If any value is null then it will become null. You might have to wrap each part
totalpayments: nz([reservation],0) +nz([downpayment],0) + nz([amountPaid],0)
Thank Sir MajP
Its working, but it gives me a popup enter parameter value "Totalpayments. Can you pls take a look, where is this parameter came from..

Also how can i format into currency the result.

Many thanks sir.
 

Minty

AWF VIP
Local time
Today, 11:05
Joined
Jul 26, 2013
Messages
10,371
Are you using totalpayments in another calculation in the same query?
 

moi

Member
Local time
Today, 18:05
Joined
Jan 10, 2024
Messages
202
If any value is null then it will become null. You might have to wrap each part
totalpayments: nz([reservation],0) +nz([downpayment],0) + nz([amountPaid],0

Are you using totalpayments in another calculation in the same query?
Yes, it is use to get the balance (totalcontractprice) - (totalpayments).
 

ebs17

Well-known member
Local time
Today, 12:05
Joined
Feb 7, 2020
Messages
1,946
Show the ENTIRE query, preferably the SQL statement from the SQL view, in text form as code.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 11:05
Joined
Feb 19, 2013
Messages
16,612
try

due: totalcontractprice-([reservation]+[downpayment])

if totalcontractprice is also calculated, use the calculation aka totalpayments
 

moi

Member
Local time
Today, 18:05
Joined
Jan 10, 2024
Messages
202
try

due: totalcontractprice-([reservation]+[downpayment])

if totalcontractprice is also calculated, use the calculation aka totalpayments
totalcontractprice is not calculated.. it is entered
 

Users who are viewing this thread

Top Bottom