|
-
Jul 7th, 2000, 06:06 AM
#1
Thread Starter
Addicted Member
Hi there how do you check if a date entered into a text box is a valid entry......
We dont want to use a date picker because they look really odd in our program, any ideas?
Rohan
-
Jul 7th, 2000, 06:14 AM
#2
IsDate function
Try this:
Code:
Dim sDate As String
sDate = Text1.Text
If IsDate(sDate) then
'Enter wanted code here
End If
Hope this helps!
-
Jul 7th, 2000, 06:15 AM
#3
Addicted Member
well, off the top of my head i would:
1. disallow the entry of letters with the use of isnumeric
2. check to make sure the propor format was entered
use instr to find 2 /'s
3. make sure the months are right
if month > 12 or month < 12
4. make sure the days are right
if days > 31 or days < 0 then
if Month = 3 then
if days > 28
hmm.. that should be about it...
-
Jul 7th, 2000, 06:18 AM
#4
-
Jul 7th, 2000, 06:22 AM
#5
CWM?
-
Jul 7th, 2000, 06:23 AM
#6
Thread Starter
Addicted Member
Forgot about IsDate
I think he forgot about the IsDate function.....
-
Jul 7th, 2000, 06:26 AM
#7
Addicted Member
heh, ya, that's it, i just forgot about it... heh, damn only having one class of vb...
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
|