Greetings,
Is there a code I could write that will add a 0 infront of a 3 digit number: Ex: 235 I want to show as 0235.
v/r
novice
Greetings,
Is there a code I could write that will add a 0 infront of a 3 digit number: Ex: 235 I want to show as 0235.
v/r
novice
Try:
Format([fieldname],"0000")
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I just tried that and it turned 5056 into 0026 and 256 into 0022, I apologize about not stating correctly but I just want to add a 0 in front of 256 and not have it change any 4 digit number that I already have.
v/r
novice
Then I don't understand the issue because the function works for me.
Format(235, "0000")
returns
0235
Format(5056, "0000")
returns
5056
Confirm by typing in the VBA immediate window:
?Format(235, "0000")
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.