Results 1 to 4 of 4

Thread: Help!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2004
    Posts
    13

    Question Help!!

    okay here is the situation:
    I have a forum with 3 radio buttons,
    2 text fields and a button. I want to enter a number in the first text field and if the first radio button is checked is will mutiply by 5 if the second is check subbstact by five and if the third is checked add 5 and write it in the second text field. now here is where it gets tricky, if the valu in the first text field is below 10 i want it to say 15 in the second text field no matter what.

    thanks in advance

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    In the button click event, check the value in the first textbox. If it is NOT less than 10, then process it.

    VB Code:
    1. 'pseudocode
    2. If NOT TextBox1.Text.ToIntegerOrToShortOrWhatever < 10 Then
    3. 'check for which radio button is selected, do processing
    4. Else
    5. TextBox2.Text = 15
    6. End If

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2004
    Posts
    13
    'pseudocode
    If NOT TextBox1.Text.ToIntegerOrToShortOrWhatever < 10 Then
    'check for which radio button is selected, do processing
    Else
    TextBox2.Text = 15
    End If

    what would I write to replace the texte in bold if the radio button's name is B

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Surely you know a little VB.NET? I'm not going to give you all the code.

    VB Code:
    1. If Me.B.Checked = True Then
    2.             'now do the maths.
    3.         End If

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