Calculated Query

M

Mike

I have a query with a field called Balance Due. I need to add 5% to the
Balance Due which I know how to write the expression

Interest Payment: [Balance Due]*0.05+[Balance Due]

BUT, when the query runs, there is no $ sign next to the result. The Balance
Due in the table is defined as currency.

How do I get a $ sign to appear next to Interest Payment?

Thank you
 
K

KARL DEWEY

Try this --
Interest Payment: Format([Balance Due]*0.05+[Balance Due], "$0.00")
 
D

Duane Hookom

I rarely care what the value looks like (formatting) in the query. I leave
the formatting for the form or report controls. Typically if you format a
number in the query, it becomes a string/text value so you lose the
capability of summing in your report or form.

--
Duane Hookom
Microsoft Access MVP


KARL DEWEY said:
Try this --
Interest Payment: Format([Balance Due]*0.05+[Balance Due], "$0.00")

--
Build a little, test a little.


Mike said:
I have a query with a field called Balance Due. I need to add 5% to the
Balance Due which I know how to write the expression

Interest Payment: [Balance Due]*0.05+[Balance Due]

BUT, when the query runs, there is no $ sign next to the result. The Balance
Due in the table is defined as currency.

How do I get a $ sign to appear next to Interest Payment?

Thank you
 
J

John Spencer

You can try
CCur([Balance Due] * 1.05)
but make sure that Balance Due is never null before doing that.

IIF([Balance Due] is Not Null,CCur([Balance Due] * 1.05),[Balance Due])

OR use the nz function to return zero for nulls
CCur(Nz([Balance Due],0) * 1.05)

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
M

Mike

Great,,it worked...........thanks so much
--
Mike


KARL DEWEY said:
Try this --
Interest Payment: Format([Balance Due]*0.05+[Balance Due], "$0.00")

--
Build a little, test a little.


Mike said:
I have a query with a field called Balance Due. I need to add 5% to the
Balance Due which I know how to write the expression

Interest Payment: [Balance Due]*0.05+[Balance Due]

BUT, when the query runs, there is no $ sign next to the result. The Balance
Due in the table is defined as currency.

How do I get a $ sign to appear next to Interest Payment?

Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top