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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Format



 
 
Thread Tools Display Modes
  #1  
Old May 11th, 2010, 07:44 PM posted to microsoft.public.access
Pass-the-Reality
external usenet poster
 
Posts: 35
Default Format

In table A I have Paid_Amount which is stored as currency. In table B I have
Membership which is stored as a number long integer. In the query I have
PMPM[Paid_Amount]/[Membership]) The query runs fine, but the data is a
long number. I then changed it to say
PMPM:FormatCurrency([Paid_Amount]/[Membership]) and I end up with $0.00 for
all my answers. What can I do?
  #2  
Old May 11th, 2010, 07:58 PM posted to microsoft.public.access
ghetto_banjo
external usenet poster
 
Posts: 325
Default Format

well technically, Paid_Amount is being stored as Double or Decimal,
but being presented as currency. When you divide by an integer,
Access thinks you are "integer math"

the solution, is to convert the integer to a double before dividing:

PMPM: [Paid_Amount] / Cdbl([Membership])


  #3  
Old May 11th, 2010, 08:01 PM posted to microsoft.public.access
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Format

PMPM:Format(([Paid_Amount]/[Membership]), "Currency")

--
Build a little, test a little.


"Pass-the-Reality" wrote:

In table A I have Paid_Amount which is stored as currency. In table B I have
Membership which is stored as a number long integer. In the query I have
PMPM[Paid_Amount]/[Membership]) The query runs fine, but the data is a
long number. I then changed it to say
PMPM:FormatCurrency([Paid_Amount]/[Membership]) and I end up with $0.00 for
all my answers. What can I do?

 




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 08:11 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.