Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to ensure proper format of text field
Message
From
11/11/2004 10:12:18
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00960423
Message ID:
00960427
Views:
7
>I need to collect a text value that represents the month and year. Should I include this in the input mask as ##/#### or as a format mask?
>
>
Hi Kirk

Here is one option:
thisform.text1.format    = "RL"
thisform.text1.inputmask = "99/9999"
At your valid you can:
return inlist(val(substr(this.value,1,2)),1,2,3,4,5,6,7,8,9,10,11,12).and.val(substr(this.value,3,4))>2003
the "R" will tell to the object to send only "999999" with no slash.. The "L" with fill with left zeros..

HTH

Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Reply
Map
View

Click here to load this message in the networking platform