How do I format a number with leading 0's

  • Thread starter Thread starter Tony Williams
  • Start date Start date
T

Tony Williams

I have a calculated number control on a form that I want to have leading
zeros. The control concatenates two other controls and the formula is
=[clientnbr] & "/" & [invnbr]

I want the end result to look like this

0060/0023

How do I do that?
Thanks
Tony
 
I have a calculated number control on a form that I want to have leading
zeros. The control concatenates two other controls and the formula is
=[clientnbr] & "/" & [invnbr]

I want the end result to look like this

0060/0023

How do I do that?
Thanks
Tony

=Format([clientmbr],"0000") & "/" & Format([invnbr],"0000")
 
If ClientNbr = 60 and InvnNbr = 23...

= "00" & CStr(ClientNbr) & "/" & "00" & CStr(InvnNbr)

Al Camp
 

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

Similar Threads

Syntax error? 6
leading zeroes being stripped 1
Leading Zero 11
Concatenate Date and Number field for Append Query 0
problem with autonumber 7
Number Formatting 4
ComboBox formatting 1
Time Format 3

Back
Top