View Full Version : Formatting text boxes that display values


GOVMATE
11-17-2009, 10:01 AM
I'm not sure how get negative numbers to appear in parenthesis. I used the Format function inconjunction with the Sum function to aggregate a field called "Net Difference No of Claimants" that exists in a table.

I've tried variations of the following function;

=Sum(FormatNumber([Net Difference No of Claimants,UseParensForNegativeNumbers])).

:confused:I'm using Access 2003 and when I attempt to view the print version to see if the function is working properly I'm asked to enter a parameter value for "Net Difference No of Claimants,UseParensForNegativeNumbers"

rainman89
11-17-2009, 10:16 AM
is "Net Difference No of Claimants" stored as a # in your table?

pbaldy
11-17-2009, 10:18 AM
Look at help on the format property of the textbox, specifically custom number formats.

GOVMATE
11-17-2009, 10:50 AM
is "Net Difference No of Claimants" stored as a # in your table?

Yes Net Difference No of Claimants is stored as a #. Each time I attempt to use what is suggested for the Format function in the help menu and then attempt to view the form in print view, access treats the function as a parameter function.

pbaldy
11-17-2009, 11:08 AM
Did you look at the Format property of the textbox? That's what I would use. Your syntax in the function is incorrect, as you've bracketed the whole thing, make it look like one big field name.

GOVMATE
11-18-2009, 11:22 AM
Did you look at the Format property of the textbox? That's what I would use. Your syntax in the function is incorrect, as you've bracketed the whole thing, make it look like one big field name.


The format property is set to general number. I used the following syntax =Sum(FormatNumber([Net Difference No of Claimants,UseParensForNegativeNumbers])) and it still doesn't work. Does anyone have suggestions?:confused:

Thanks!

pbaldy
11-18-2009, 11:54 AM
Like I said, a custom format such as:

#,###.00;(#,###.00)

instead of General Number.

GOVMATE
12-02-2009, 07:23 AM
Thanks pbaldy!

I figured it out!