add zero before number under 10 and put it in calculated field

basilyos

Registered User.
Local time
Today, 12:21
Joined
Jan 13, 2014
Messages
256
i have two columns (CodePrefix) and (CodeNumber) in a table
i changed (CodeNumber) format to 00 so i get the right result (01-02-03-04-...)

now i created a query and i added this two fields and i created a calculated field [CodePrefix] & "-" & [CodeNumber]

CodePrefix = W-MUG
CodeNumber = 01
the result it will be W-MUG-01
but am getting W-MUG-1 instead of W-MUG-01

so what should i do

thanks in advance
 
i changed (CodeNumber) format to 00
format properties are not passed on to calculations etc.

try
[CodePrefix] & "-" & format([CodeNumber],"00")

however not sure if the format function will work in a calculated field - which have many limitations, not least of which is that they cannot be indexed, so any searches, sorts and filters etc will be sequential and consequently slow.
 
Last edited:
thank you everything is ok i changed , to ;
 

Users who are viewing this thread

Back
Top Bottom