|
-
May 20th, 2001, 11:45 PM
#1
How to let user enter dd/mm/yyyy to dd/mm/yyyy
Hi:
Here I have a imple question. I want to let user enter a period form to in the format of dd/mm/yyyy to dd/mm/yyy.If I want to let user enter in the .. area in the following
../../.... to ../../....
How can I do it.
I try to use text box, with / / to / / in the text field . It doesn't work.
I don't want to use DTpicker.
If anybody can help, It will be very great!!
wky086
-
May 21st, 2001, 12:02 AM
#2
Re: How to let user enter dd/mm/yyyy to dd/mm/yyyy
try http://vblib.virtualave.net, there is a function call AllowsOnlyData in vbKeyboard which might help. put the function in the textbox keypress event.
HTH
-
May 21st, 2001, 02:05 AM
#3
Re: How to let user enter dd/mm/yyyy to dd/mm/yyyy
Hi:
Thanks for your reply, but I cannot find this function form that website.
wky086
-
May 21st, 2001, 02:33 AM
#4
Re: How to let user enter dd/mm/yyyy to dd/mm/yyyy
download the DLL and register it. add a reference to the DLL and you will need to create an instance of vbKeyboard as below
dim vbKeyboard as new vbKeyboard
then you can call
vbKeyboard.AllowsOnlyDate
HTH
-
May 21st, 2001, 07:05 AM
#5
Re: How to let user enter dd/mm/yyyy to dd/mm/yyyy
Do validation on LostFocus event. Something like
If left(txtMyDate,3) <> "/" then msgbox "Invalid Format"
If mid(txtMyDate,6,1) <> "/" then msgbox "Invalid Format"
etc
Iouri Boutchkine
[email protected]
-
May 21st, 2001, 08:03 AM
#6
Re: How to let user enter dd/mm/yyyy to dd/mm/yyyy
Use Microsoft Masked Edit Control 6.0 and set the .Masked property to ##/##/####
-Cool Bizs
Good Luck,
-Cool Bizs
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|