Adding leading zeros to alphanumeric text

mathsbeauty

Registered User.
Local time
Today, 06:50
Joined
Apr 14, 2011
Messages
13
Hello! I am new here. If "2" is in field, I want display in report as "02". If "*2" is in field , I want display in report as "*02" i.e. if there is only one digit with or without *, then I want to add one leading zero to make it two digit. . I hope to get some help from experts.
 
Sorry Dear, but *2 is displayed as *2 and not as *02
 
Expr1: IIf((Left([f1],1)<>"*"),(Format([F1],"00")),("*" & Format((Right([f1],1)),"00")))

This will evaluate if the asterisk is present and format accordingly.
 
Thanks gaby, for your efforts. It just worked perfectly! Thank you very much!
 

Users who are viewing this thread

Back
Top Bottom