Results 1 to 4 of 4

Thread: Not sure what catagory this falls in....

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Posts
    67
    Here is what I have so far (practice program):

    Private Sub cmdCalc_Click()
    If chk1 = 0 Then
    txt1a.Text = txt1 * txtA
    txt2a.Text = txt2 * txtB
    txtAve.Text = Round((Val(txt1a) + Val(txt2a)) / (Val(txt1) + Val(txt2)), 3)
    Else
    txt1a.Text = txt1 * txtA
    txt2a.Text = txt2 * txtB
    txt3a.Text = txt3 * txtC
    txtAve.Text = Round((Val(txt1a) + Val(txt2a) + Val(txt3a)) / (Val(txt1) + Val(txt2) + Val(txt3)), 3)
    end if

    It does work. The problem is that there is another check box option in my program (chk2).

    Is there a way to include it with its function into this code. Something to the twist of:
    If chk1 = 0 and chk2 = 0 then.....blah blah

    something along those lines.
    Not sure if this makes sense.

    Thank you.

  2. #2
    Addicted Member
    Join Date
    Aug 2000
    Location
    Australia
    Posts
    149
    Not sure what your are asking, maybe try to explain a bit more.

    -|- Hurgh! -|-

  3. #3
    Fanatic Member joltremari's Avatar
    Join Date
    Sep 2000
    Location
    Mississippi
    Posts
    674
    I am not sure what your asking, especially without knowing what chk2 does. But you can use and/or if statements, if thats what your asking:

    If chk1 = 0 And chk2 = 0 Then blah... blah or

    If chk1 = 0 Or chk2 = 0 Then .........

    I am not sure if I'm on the right track or not.

    JO

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    If chk1.value = true and chk2.value = true Then
    'bal bla
    End If

    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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