If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Calculated Query
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 -- Mike |
#2
|
|||
|
|||
Calculated Query
Try this --
Interest Payment: Format([Balance Due]*0.05+[Balance Due], "$0.00") -- Build a little, test a little. "Mike" wrote: 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 -- Mike |
#3
|
|||
|
|||
Calculated Query
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" wrote: Try this -- Interest Payment: Format([Balance Due]*0.05+[Balance Due], "$0.00") -- Build a little, test a little. "Mike" wrote: 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 -- Mike |
#4
|
|||
|
|||
Calculated Query
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 Mike wrote: 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 |
#5
|
|||
|
|||
Calculated Query
Great,,it worked...........thanks so much
-- Mike "KARL DEWEY" wrote: Try this -- Interest Payment: Format([Balance Due]*0.05+[Balance Due], "$0.00") -- Build a little, test a little. "Mike" wrote: 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 -- Mike |
Thread Tools | |
Display Modes | |
|
|