Connecting Tech Pros Worldwide Forums | Help | Site Map

Number Formattng

Newbie
 
Join Date: Jun 2007
Posts: 19
#1: Jul 17 '07
Hello,

I am getting a numeric value in a query like 42.56, 89.67, 56.77, etc.
I want to format these values like 04256, 08967, 05677.

Please help !!!!!!


Thanks in advance.

Newbie
 
Join Date: Oct 2006
Posts: 2
#2: Jul 17 '07

re: Number Formattng


Your query column that is returning a double like 123.1 could be made to return a string like 12310 by using this on the first line of the column in the query:

ShowMe:Right("00000" & cstr(dblOriginalValue*100),5)

I'm assuming that dblOriginalvalue is however you're getting those original numeric values of 42.56, etc., and also that you aren't anticipating any value over 999.99 to be returned (or it would need to be more than 5-characters wide).

Hope this helps some.


Quote:

Originally Posted by imnewtoaccess

Hello,

I am getting a numeric value in a query like 42.56, 89.67, 56.77, etc.
I want to format these values like 04256, 08967, 05677.

Please help !!!!!!


Thanks in advance.

Expert
 
Join Date: Jun 2007
Location: Derbyshire, UK
Posts: 347
#3: Jul 17 '07

re: Number Formattng


Hi

Or pehaps


Format(42.57*100,"00000") etc.

??


MTB
Reply