Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Leading Zeros
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00558362
Message ID:
00558365
Views:
22
>Good Day all!
>
>My question is this...I have a field in my table called OrderId it is 7 characters long. If an id is entered that is three characters (ex. 123) I would like to have it replaced with leading zeros to the max of C(7) (ex. 0000123). Is this possible to do in the table designer..input mask or format fields? Any other suggestions?
>
>Thanks for your time!


Look at the PADL command. You can put this in the valid event of any text input box you create.

PADL(this.value,7,'0')

Will pad zeros to the left of the value up to 7 characters.

HTH
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Reply
Map
View

Click here to load this message in the networking platform