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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Numbers in Access

Status
Not open for further replies.

godzawilla

IS-IT--Management
Jul 9, 2002
14
US
I need to format numbers in an access query. I need to include 11 place holders and have a 0 displayed where there is no number. So field 1 needs to displayed 00000000001 and field 1111 displayed 00000001111. I cannot seem to make the input mask work and my SQL is quite rusty. Any help would be appreciated.
Thanks
 
All you need is

=Format([fieldwithnumber], "00000000000")

Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need! [thumbsup2]

Robert L. Johnson III, A+, Network+, MCP
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
 
In query design view right click in the column you want to format.

Select properties and in the format box type your 11 zeros.

Now run the query.

Alternatively you can put the zeros as a format in the table design view in which case it should be inherited by all queries based on the table.

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top