A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculated Query



 
 
Thread Tools Display Modes
  #1  
Old December 8th, 2009, 04:01 PM posted to microsoft.public.access.queries
mike
external usenet poster
 
Posts: 3,942
Default 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  
Old December 8th, 2009, 04:36 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default 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  
Old December 8th, 2009, 04:46 PM posted to microsoft.public.access.queries
Duane Hookom
external usenet poster
 
Posts: 7,177
Default 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  
Old December 8th, 2009, 04:56 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default 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  
Old December 8th, 2009, 05:22 PM posted to microsoft.public.access.queries
mike
external usenet poster
 
Posts: 3,942
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.