>>Display transform(Field, "@L 999") instead. It will give you leading zeros. But this also means you'll get 001 for 1, 020 for 20 etc. If you need it for zeros only, then transform(Field, iif(field=0, "@L ","")+"999").
>
>Hi Dragan:
>
>Thank you for your kind reponse.
>
>This is a neat idea too. What I have done for now is that I used an If statement to check if the field had a zero. If it did, I then redeclared the variable that holeds that information as a String and then assigned it a value of "000". I will try yoour idea in a report.
Switching the type of a variable may be tricky, and could generally make you write more code, and yet the code would be less stable.
My advice is to keep it numeric, and just do this sort of makeup for display purposes. If you're keeping it in a textbox, set the texbox's .format="L", .inputmask="999". You may want to remove the format when it gets focus and restore it when it loses focus, to ease the data input.