Re: export numeric field right alligned
- From: Salad <oil@xxxxxxxxxxx>
- Date: Thu, 30 Aug 2007 09:42:43 -0700
Salad wrote:
janssensglb@xxxxxxxxxx wrote:
Don't fill the leading blanks with zero's but with spaces...
Arno R
I'm not sure how I can do that.
If the value of the record is eg. 1.23, I need to fill 6 leading
blanks with spaces. If the value is 1234.56, I need to fill 3 leading
blanks with zeros.
Can I do this using the format function?
Thanks
a = 123.45
? Right(string(10," ") & a,10)
123.45
or
? Right(string(10,space(1)) & a,10)
123.45
Hmmmm...I decided to check for a number like 123.50.
a = 123.50
? Right(string(10,space(1)) & a,10)
123.5
? Right(string(10,space(1)) & format(a,"0.00"),10)
123.50
You might want to format to keep the ending 0's.
.
- References:
- export numeric field right alligned
- From: janssensglb
- Re: export numeric field right alligned
- From: Arno R
- Re: export numeric field right alligned
- From: janssensglb
- Re: export numeric field right alligned
- From: Salad
- export numeric field right alligned
- Prev by Date: Re: export numeric field right alligned
- Next by Date: Re: Trying to understand the example code in A97 For Each HELP
- Previous by thread: Re: export numeric field right alligned
- Next by thread: Office button and ribbon customization / nav. pane
- Index(es):