Results 1 to 4 of 4

Thread: checking data types

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Location
    Dunkin Donuts
    Posts
    4

    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,
    Donut Man

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    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....

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Location
    Dunkin Donuts
    Posts
    4
    Thanks man, thats exactly what i needed
    Donut Man

  4. #4
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    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
  •  



Click Here to Expand Forum to Full Width