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

Currency Format not working



 
 
Thread Tools Display Modes
  #1  
Old January 27th, 2010, 10:50 PM posted to microsoft.public.access.forms
iamnu
external usenet poster
 
Posts: 99
Default Currency Format not working

Control Source: =Format([Forms]![MedicalForm]![frmMSsubform].[Form].
[txtAcctTotal],"Currency")
Format: $#,##0.00;($#,##0.00)[Red]

I have also tried the following Control Source:
=Format([Forms]![MedicalForm]![frmMSsubform].[Form].
[txtAcctTotal],"$#,##0.00;($#,##0.00)[Red]")

In both cases, the Color is NOT Red when the value is negative.
Can someone explain why?
  #2  
Old January 28th, 2010, 01:44 AM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Currency Format not working

On Wed, 27 Jan 2010 14:50:05 -0800 (PST), iamnu wrote:

Control Source: =Format([Forms]![MedicalForm]![frmMSsubform].[Form].
[txtAcctTotal],"Currency")
Format: $#,##0.00;($#,##0.00)[Red]

I have also tried the following Control Source:
=Format([Forms]![MedicalForm]![frmMSsubform].[Form].
[txtAcctTotal],"$#,##0.00;($#,##0.00)[Red]")

In both cases, the Color is NOT Red when the value is negative.
Can someone explain why?


Because you're tripping over your own feet. The Format() *FUNCTION* returns a
text string; applying the textbox's Format property on top of that is messing
you up (since the textbox's format property expects a numeric Currency value,
not a text string).

Try setting the control source to just txtAcctTotal itself, and use the format
property as in your first example. You may need all four format options
(positive, negative, zero and Null):

$#,##0.00;($#,##0.00)[Red];"$0.00";"Unknown"

--

John W. Vinson [MVP]
  #3  
Old January 28th, 2010, 02:36 AM posted to microsoft.public.access.forms
iamnu
external usenet poster
 
Posts: 99
Default Currency Format not working

On Jan 27, 6:44*pm, John W. Vinson
wrote:
On Wed, 27 Jan 2010 14:50:05 -0800 (PST), iamnu wrote:
Control Source: =Format([Forms]![MedicalForm]![frmMSsubform].[Form].
[txtAcctTotal],"Currency")
Format: $#,##0.00;($#,##0.00)[Red]


I have also tried the following Control Source:
=Format([Forms]![MedicalForm]![frmMSsubform].[Form].
[txtAcctTotal],"$#,##0.00;($#,##0.00)[Red]")


In both cases, the Color is NOT Red when the value is negative.
Can someone explain why?


Because you're tripping over your own feet. The Format() *FUNCTION* returns a
text string; applying the textbox's Format property on top of that is messing
you up (since the textbox's format property expects a numeric Currency value,
not a text string).

Try setting the control source to just txtAcctTotal itself, and use the format
property as in your first example. You may need all four format options
(positive, negative, zero and Null):

$#,##0.00;($#,##0.00)[Red];"$0.00";"Unknown"

--

* * * * * * *John W. Vinson [MVP]


Okay, thank you, sir!
 




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 07:54 AM.


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