Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting a number to a certain format

Status
Not open for further replies.

wally2321

Technical User
May 30, 2001
64
0
0
US
I have not used MS Access in a while and I have forgotten a lot of the technical detail. I am currently creating a query using the design function of Access. The query is a "MAKE" query so a new table will be made after running the query.

In the source table I have a field value such as the following:

2400.00

I need the query to run and create the table with this field but in the following format:

000240000

Can someone please direct me on how I can do this? Please keep in mind that I am using the design feature of query.

Thanks for your time!
 
Is the format always 9 characters??? And you want to pad the front of the amount with zeros??? And the return value is a string with the amount to the right and padded zeros to the left??? If this is correct, shoot me an email to my address below and I will send you a sample database with this set up for you..... The secret to creativity is knowing how to hide your sources. - Albert Einstein [spin]

Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
 
just set the format of the field to the # of 'characters' you want to have, as "000000000" (for nine characters wide). This works for the numeric fields.


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top