Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Access
3rdpartyusrgrp
access
activexcontrol
adp.sqlserver
commandbarsui
conversion
dataaccess.pages
developers.toolkitode
devtoolkits
externaldata
forms
formscoding
gettingstarted
internet
interopoledde
macros
modulescoding
modulesdaovba
modulesdaovba.ado
multiuser
odbcclientsvr
queries
replication
reports
security
setupconfig
tablesdbdesign
  
 
date: Fri, 4 Jul 2008 10:47:54 -0700,    group: microsoft.public.access.queries        back       


Formatting a Number in a Query Field   
All,

I have a field value that is formatted currency. I need to format the field 
in a query to have leading zeros and retain the decimal values without the 
decimal.

Example: Field A= 137.19  I need to convert it to 0013719.

I've attempted to convert it to a string and format it to"0000000", but that 
just rounded the number and did not retain the decimal values.

I've also tried using the FormatNumber and Val functions without success.

Any guidance you could give me would be greatly appreciated.

Thanks in advance.
date: Fri, 4 Jul 2008 10:47:54 -0700   author:   Brad

Re: Formatting a Number in a Query Field   
On Fri, 4 Jul 2008 10:47:54 -0700, Brad wrote:

> All,
> 
> I have a field value that is formatted currency. I need to format the field 
> in a query to have leading zeros and retain the decimal values without the 
> decimal.
> 
> Example: Field A= 137.19  I need to convert it to 0013719.
> 
> I've attempted to convert it to a string and format it to"0000000", but that 
> just rounded the number and did not retain the decimal values.
> 
> I've also tried using the FormatNumber and Val functions without success.
> 
> Any guidance you could give me would be greatly appreciated.
> 
> Thanks in advance.

NewColumn:Format([NumberField]*100,"0000000")
-- 
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
date: Fri, 4 Jul 2008 11:01:17 -0700   author:   fredg lid

Re: Formatting a Number in a Query Field   
Fredg,

Thank you, so simple a solution I completely over looked it.

Thanks, again!


"fredg" <fgutkind@example.invalid> wrote in message 
news:1w6w8a6cm0uup$.19e147eobh9m8.dlg@40tude.net...
> On Fri, 4 Jul 2008 10:47:54 -0700, Brad wrote:
>
>> All,
>>
>> I have a field value that is formatted currency. I need to format the 
>> field
>> in a query to have leading zeros and retain the decimal values without 
>> the
>> decimal.
>>
>> Example: Field A= 137.19  I need to convert it to 0013719.
>>
>> I've attempted to convert it to a string and format it to"0000000", but 
>> that
>> just rounded the number and did not retain the decimal values.
>>
>> I've also tried using the FormatNumber and Val functions without success.
>>
>> Any guidance you could give me would be greatly appreciated.
>>
>> Thanks in advance.
>
> NewColumn:Format([NumberField]*100,"0000000")
> -- 
> Fred
> Please respond only to this newsgroup.
> I do not reply to personal e-mail
>
date: Fri, 4 Jul 2008 11:20:41 -0700   author:   Brad

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us