Calculated column in query (1 Viewer)

moi

Member
Local time
Today, 21:22
Joined
Jan 10, 2024
Messages
63
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, 08:22
Joined
May 21, 2018
Messages
8,417
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, 21:22
Joined
Jan 10, 2024
Messages
63
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, 13:22
Joined
Jul 26, 2013
Messages
10,327
Are you using totalpayments in another calculation in the same query?
 

moi

Member
Local time
Today, 21:22
Joined
Jan 10, 2024
Messages
63
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, 14:22
Joined
Feb 7, 2020
Messages
1,745
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, 13:22
Joined
Feb 19, 2013
Messages
16,485
try

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

if totalcontractprice is also calculated, use the calculation aka totalpayments
 

moi

Member
Local time
Today, 21:22
Joined
Jan 10, 2024
Messages
63
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