[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bump::msaccess

Title:MSACCESS
Moderator:BUMP::HONER
Created:Tue Dec 01 1992
Last Modified:Mon Jun 02 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1661
Total number of notes:6339

874.0. "Real number representation" by SHOEBX::CONNER () Mon Oct 17 1994 12:22

T.RTitleUserPersonal
Name
DateLines
874.1more infoSHOEBX::CONNERMon Oct 17 1994 14:5921
874.2REAL to SINGLE works okWOODBX::CONNERMon Oct 17 1994 19:055
874.3Field Test BugSHOEBX::CONNERTue Oct 18 1994 17:175
874.4BUSY::SLABAntisocialWed Feb 05 1997 17:1612
    
    	Not relevant to the base note, but relevant to numbers:
    
    	How do I specify the output format of a negative number in Access
    	V2?  My report is spitting out parentheses and I'd like to show a
    	negative sign instead.
    
    	I looked in Table, Query and Report [field] properties but there
    	doesn't seem to be a place to choose this output.
    
    	Thanks for any info.
    
874.5OSEC::pervy.mco.dec.com::gilbertbcyberpaddlerWed Feb 05 1997 18:4683
I'm not sure how different the versions are, but here's the way Access 95 
defines number formats, via the format property of a field:

Number and Currency data display formats

If you don't specify a format, or if you specify the General Number format, 
Microsoft Access displays numbers with no thousands separator or other 
formatting. If you want numbers in a field to have a thousands separator, 
choose Standard or Currency setting.

Predefined formats

The following table shows the predefined formats available for fields with 
the Number or Currency data type and the way they display data by default in 
a form, report, or datasheet.

With this format		This number	Is displayed this way
General Number (default)	1234.5		1234.5
Currency			1234.5	$1,234.50 (U.S.)�1,234.50 (U.K.)
Fixed				1234.5		1234
Standard			1234.5		1,234.50
Percent				0.824		82.40%
Scientific			1234.5		1.23E+03
The General Number format displays just the number of decimal places 
necessary for each value. If you specify a format other than General Number, 
such as Fixed, you can specify the number of decimal places you want to 
display by setting the DecimalPlaces property. When the DecimalPlaces 
property has been set to Auto, the default, Microsoft Access displays the 
default number of decimal places for the format (0 for Fixed, 2 for other 
formats).

Note   To ensure consistency among applications, Microsoft Access uses the 
regional settings specified in the Windows Control Panel for some predefined 
number and date/time formats. For more information, click  . 

Custom formats

Custom formats for fields containing numbers can have one to four sections 
separated with semicolons. The sections for custom number formats have the 
following meanings.

Section	Meaning
First	Positive numbers
Second	Negative numbers
Third	Zero values
Fourth	Null or empty values
For example, the standard Currency format can be created with this custom 
format: 
$#,##0.00;($#,##0.00)[Red]
This number format contains two sections separated by a semicolon and uses a 
different format for positive numbers (determined by the first section) than 
for negative numbers (determined by the second section). Both positive and 
negative numbers have the currency sign and the comma separator for 
thousands; in addition, negative numbers are red and enclosed in 
parentheses.

You can create custom formats for Number fields using the following codes.

Setting	Description
. (period)	Decimal separator. Separators are set in the regional 
settings specified in the Windows Control Panel.
, (comma)	Thousands separator.
0		Digit placeholder. Display digit or 0.
#		Digit placeholder. Display a digit or nothing.
$		Display the literal character $.
%		Percentage. Value is multiplied by 100 and the percent sign 
is appended.
E- or e-	Scientific notation with a minus sign next to negative 
exponents and nothing next to positive exponents. It must be used with other 
symbols, as in 0.00E-00.
E+ or e+	Scientific notation with a minus sign next to negative 
exponents and a plus sign next to positive exponents. It must be used with 
other symbols, as in 0.00E+00.
(Space)		Press SPACEBAR to enter spaces as literal characters.
"ABC"		Display anything inside quotation marks as literal 
characters.
!		Force left alignment instead of right alignment.
[color]		Display in the color named between the brackets. Available 
colors: Black, Blue, Green, Cyan, Red, Magenta, Yellow, and White.
Note   Use the DecimalPlaces property to display a different number of 
decimal places than the Format property settings allow. For more 
information, click  .
874.6Or look outside Access for the Windows 95 settingsNSIC00::KLERKThunderbirds are GoThu Feb 06 1997 04:387

 If nothing is specified via Format specifications inside Access, the
 representation for numbers is done via the Control Panel -> International
 Settings definitions of Windows 3.11 or Windows 95.

 Theo
874.7BUSY::SLABCandy'O, I need you ...Thu Feb 06 1997 16:4712
    
    	Well, I started by going into the control panel [NT3.51] and set-
    	ting international to use - instead of (.  Then I went into Access
    	and ran the report again but nothing changed.  However, I didn't
    	exit out of Access completely, which might have made a difference.
    
    	Then I went back into Access and selected a currency field, and lo
    	and behold, the exact positive;negative parameters I wanted were
    	right there in the Format field.
    
    	Thanks to both of you.