|
-
April 30th, 2003, 06:53 PM
#1
Member
vb data validation
I'm trying to make sure that the data given by 2 text fields is no more than 60, but when i enter 10 in the first (txthoursworked) and 5 in the second (txtovertime) it returns true. The code below is what i`m using.
'check numeric data
If (txthoursworked.Text + txtovertime.Text > 60) Then
MsgBox "An employee cannot work over 60 hours"
End
End If
I`ve tried storing txthoursworked.Text + txtovertime.Text in a variable and using that but its the same, i tried moving around the brackets but that did nothing either, what's wrong? How can 5+10 equal > 60 ?
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
|
|