if less then 7 digits

stu_c

Registered User.
Local time
Today, 22:23
Joined
Sep 20, 2007
Messages
494
Hi all
I have reference numbers such as 12345/89 iI want an if query to say if <7 then put leading zeros etc

eg: 123/89 changes to 00123/89 or 23/56 to 00023/56
 
Expr1: String(7-Len(Number),"0") & Number
 
Is this for display purposes only?
If it is you can format the control on a form to display leading zero's.
1653659755994.png
 
Minty, would that format string work for text? Because his numbers include a virgule (/) in his examples.
 

Users who are viewing this thread

Back
Top Bottom