Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QBE function for filling 11 digits

Status
Not open for further replies.

cyberbob2

Programmer
Nov 13, 2003
32
US
Hello,

I have been trying to come up with a IIF function to do the following
in a QBE grid:

If a number is 10 digits or less, then add leading zeros to fill up 11
spaces.
Examples:
1234567899 = 01234567899
02356 = 00000002356

If a number is 11, 12 or 13 digits, leave it alone.
Examples:
12345678991
645363736562
6475837645744

Any help would be greatly appreciated.

Thanks,
KP


 
Why not simply using a format like "00000000000" ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Try

Expr1: Format([yourFld],"00000000000")


HTH

John




When Galileo theorized that Aristotle's view of the Universe contained errors, he was labeled a fool.
It wasn't until he proved it that he was called dangerous.
[wink]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top