Heenan, Lambert
Lambert.Heenan at AIG.com
Tue Oct 14 09:47:32 CDT 2003
I sit corrected, it was indeed the Str() function my lame-brain was "thinking" of. Lambert > -----Original Message----- > From: Gustav Brock [SMTP:gustav at cactus.dk] > Sent: Tuesday, October 14, 2003 3:19 AM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Re: Number vs text data type > > Hi Lambert > > This is not correct - you must be thinking of Str() which adds a > leading place holder (space) for the sign but doesn't display a plus > sign, thus > > 2 displays as " 2" > -2 displays as "-2" > > which has the advantage of listing positive and negative numbers > nicely when using a monospaced font. > > Like CStr(), Format() does not have this behaviour. You can, however, > tell Format() to act like Str() this way: > > strVal = Format(lngVal," 0;-0") > > But why should you? Str() is very much faster than Format(). > > /gustav > > > > Format *always* pads with one space, to get more just include spaces in > the > > format string, thus... > > > format(2,"0") will display (without the quotes) " 2" > > format(2," 0") will display " 2" > > > if you don't want any padding use Cstr instead of Format. > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com