Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Case Sensitive
Message
 
To
01/02/2000 10:03:57
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00325543
Message ID:
00325576
Views:
21
You probably have to input as character and validate. Try this code as an example:
oTest = create("form")
oTest.Addobject("txtTest", "txtDate")
*- Add another textbox so we can move off the first one...
oTest.Addobject("txtDummy", "textbox")
oTest.txtTest.visible = .t.
oTest.txtDummy.left = 150
oTest.txtDummy.visible = .t.
oTest.show(1)

define class txtDate as textbox
	inputmask = "99/99/9999"
	proc valid
		if len(allt(this.value)) < 10
			=messagebox("You must enter a century!")
			return 0
		endif
	endproc
enddefine
>Thanks, that's fine.
>
>Can you also tell me how to force users to input a full century date into a textbox?
>
>Kev
"It hit an iceberg and it sank. Get over it."
Robert Ballard, dicoverer of the Titanic wreckage.
Previous
Reply
Map
View

Click here to load this message in the networking platform