|
-
Oct 4th, 2000, 10:07 PM
#1
Thread Starter
Member
ok. my next prob is what if i want that my text box accepts date formats only?
-
Oct 4th, 2000, 10:14 PM
#2
Use the IsDate function.
Code:
Private Sub Command1_Click()
If IsDate(Text1.Text) Then
MsgBox "Date correct"
Else
MsgBox "Invalid date!"
End If
End Sub
-
Oct 4th, 2000, 10:24 PM
#3
New Member
you may want to put the IsDate function in the validate event.
OR- You can implement a filter on the text box when it becomes active, youcan filter out all letters, etc.
Also, you can use the mask edit text box control which allows you to put an input mask on the text box like when the box becomes active **/**/****.
This is an active x control and is behaves weirdly, you'll have to add code to handle possible errors.
Hope this helps!!
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
|