Results 1 to 8 of 8

Thread: ....

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    3

    Resolved ....

    .....
    Last edited by YHaney; Nov 24th, 2007 at 09:52 PM.

  2. #2
    Fanatic Member
    Join Date
    Jul 2006
    Location
    Anchorage, Alaska
    Posts
    545

    Re: How can I display text in resultTextBox?

    You would have to check if the values are invalid.


    Try the IF statement, or the Select Case statement.

    vbcode Code:
    1. 'Create Error Messege Variable
    2. Dim ErrMsg as String
    3.  
    4. If Year < 1950 or Year > 2050 then
    5.      ErrMsg = "Please enter value from 1950-2050"
    6. else
    7.      ErrMsg = ""
    8. End If


    vbcode Code:
    1. 'Create errormessage variable
    2. Dim ErrMsg as string
    3.  
    4. select case year
    5.      case <1950 or >2050
    6.           ErrMsg="Please enter a date between 1950 and 2050"
    7.  
    8.      case else
    9.           'set value to "" so no messege
    10.           ErrMsg = ""
    11.           'do nothing, the value is inbetween
    12. end case
    Please RATE posts, click the RATE button to the left under the Users Name.

    Once your thread has been answered, Please use the Thread Tools and select RESOLVED so everyone knows your question has been answered.


    "As I look past the light, I see the world I wished tonight, never the less, sleep has come, and death shall soon follow..." © 1998 Jeremy J Swartwood

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    3

    Question Re: How can I display text in resultTextBox?

    .....
    Last edited by YHaney; Nov 24th, 2007 at 09:34 PM.

  4. #4
    Fanatic Member
    Join Date
    Jul 2006
    Location
    Anchorage, Alaska
    Posts
    545

    Re: How can I display text in resultTextBox?

    I am at work and might not able able to fully answer you.

    vb Code:
    1. Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button.Click
    2. 'Put code here to get information from the text boxes.
    3. 'Also put code here to check the text boxes.
    4. 'Put code here to check the Interest to make sure it is >0 and <100, or >=0 and <=100
    5. End Sub
    Please RATE posts, click the RATE button to the left under the Users Name.

    Once your thread has been answered, Please use the Thread Tools and select RESOLVED so everyone knows your question has been answered.


    "As I look past the light, I see the world I wished tonight, never the less, sleep has come, and death shall soon follow..." © 1998 Jeremy J Swartwood

  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    3

    Re: ....

    Thank you! I got it!

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: ....

    Please don't just remove everything you posted. The idea of this forum is to help people. Now those who have the same question as you will have to ask it again instead of just reading this thread.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7
    Frenzied Member MaximilianMayrhofer's Avatar
    Join Date
    Aug 2007
    Location
    IM IN YR LOOP
    Posts
    2,001

    Re: ....

    A selfish forum member? Sounds like an oxymoron..

  8. #8
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: ....

    Thread closed since it isn't of any use any more...

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