Convertion Numeric to Character

G

Guest

anyone know how to convert a numeric value into character format with fix length and fill in the blank spaces with zero.
I have an autonumber field in my table then I want to convert the auto number value in a format like this :

autonumber field conversion result
----------------------------------------------------
1 0000001
.... ...........
789 000789

thanks for the ideas
 
C

Cheryl Fischer

Gabriel,

Use the Format() function, like so...

Format([MyAutoNumber], "0000000")

The above expression will format your first example to seven characters as
follows: 0000001. To format your second example, use six zeros in the
expression:

Format([MyAugoNumber], "000000")


hth,

--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


Gabriel said:
anyone know how to convert a numeric value into character format with fix
length and fill in the blank spaces with zero.
I have an autonumber field in my table then I want to convert the auto
number value in a format like this :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top