Results 1 to 5 of 5

Thread: Messagebox

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    7

    Messagebox

    Hello!! VB.NET 2003
    I am so new at this it isn't funny. I am right now programming a fun little test that people take in order to find out their life expectancy. Any how it is a 3 page application and before the user clicks the "Next Page" button I want the program to catch any questions that haven't been answered.

    The questions are asked and then the user fills in 1 of 2 radio buttons that are grouped together by the panel control.

    What I want is instead of having multiple boxes pop up when the user forgets to answer more than one question, I want only one box that states "You have not answered Question#: 1, 5, and 10. You need to answer these before moving on to the next page" And I don't want the user to be able to go to the next page until these fields have been filled in. Down below I will put what I have if someone could help me out I would be so greatful Thanks!!! PS... as it stands my code won't even let me get to the second page anyways....This can be awfully frustrating


    PrivateSub btnNext_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btnNext.Click
    If mypart1.rdoYes01.Checked = FalseAnd mypart1.rdoNo01.Checked = FalseThen
    MessageBox.Show("Hey!! You need to answer number 1!")
    EndIf
    If mypart1.rdoYes02.Checked = FalseAnd mypart1.rdoNo02.Checked = FalseThen
    MessageBox.Show("Hey!! You need to answer number 2!")
    EndIf
    If mypart1.rdoYes03.Checked = FalseAnd mypart1.rdoNo03.Checked = FalseThen
    MessageBox.Show("Hey!! You need to answer number 3!")
    EndIf
    If mypart1.rdoYes04.Checked = FalseAnd mypart1.rdoNo04.Checked = FalseThen
    MessageBox.Show("Hey!! You need to answer number 4!")
    EndIf
    If mypart1.rdoYes05.Checked = FalseAnd mypart1.rdoNo05.Checked = FalseThen
    MessageBox.Show("Hey!! You need to answer number 5!")
    EndIf
    If mypart1.rdoYes06.Checked = FalseAnd mypart1.rdoNo06.Checked = FalseThen
    MessageBox.Show("Hey!! You need to answer number 6!")
    EndIf
    If mypart1.rdoYes07.Checked = FalseAnd mypart1.rdoNo07.Checked = FalseThen
    MessageBox.Show("Hey!! You need to answer number 7!")
    EndIf
    If mypart1.rdoYes08.Checked = FalseAnd mypart1.rdoNo08.Checked = FalseThen
    MessageBox.Show("Hey!! You need to answer number 8!")
    EndIf
    If mypart1.rdoYes09.Checked = FalseAnd mypart1.rdoNo09.Checked = FalseThen
    MessageBox.Show("Hey!! You need to answer number 9!")
    EndIf
    If mypart1.rdoYes10.Checked = FalseAnd mypart1.rdoNo10.Checked = FalseThen
    MessageBox.Show("Hey!! You need to answer number 10!")
    EndIf
    ExitSub
    mypart2 = New part2
    mypart2.Show()
    mypart1.Hide()
    EndSub
    Last edited by jenok2000; Apr 9th, 2006 at 04:03 PM.

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