|
-
Mar 9th, 2002, 09:10 PM
#1
Thread Starter
New Member
checking data types
Yo, I'm wondering if anyone knows a function I can use to check whether a certain variable has been returned as an integer or a string. For example, say you have a text box getting input from the user and the user enters both words and numbers into the box. If you are assigning this input to variables, how can you check what type the data is so you dont assign a string to an integer variable and get a runtime error? If anyone knows, I'm awaiting the answer. Thanks,
-
Mar 9th, 2002, 09:12 PM
#2
PowerPoster
Well
Isnumeric(Me.text1.text)
If true = valid number was entered
If false, two possible reasons,
1) No entry (len(text1.text)=0)
2) string was entered...
Will this work for ya?
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Mar 9th, 2002, 09:17 PM
#3
Thread Starter
New Member
Thanks man, thats exactly what i needed
-
Mar 9th, 2002, 09:18 PM
#4
PowerPoster
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
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
|