Results 1 to 3 of 3

Thread: [RESOLVED] Problem with checkbox

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Location
    in Poland
    Posts
    390

    Resolved [RESOLVED] Problem with checkbox

    Hi All

    I have several Checkboxes. I have commandbutton also. Every checkboxes it have an assigned a one textbox to which I transfer the data. When I click on the commandbutton I want to make that this data will be only for this textboxes which will have checkbox with value as True (vbchecked) How to make?

    When I make something like this
    VB Code:
    1. If chkWTY.Value = vbChecked then
    2.   txtWTY.Text = SumPio
    3. ElseIf chkGRB.Value = vbChecked then
    4.   txtGRB.Text = AsHun
    5. ...etc
    6. ...etc
    7. End If

    it not work

    thanks in advance
    I know, I know, my English is bad, sorry .....

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Problem with checkbox

    you probably want independent If statements:
    VB Code:
    1. If chkWTY.Value = vbChecked then txtWTY.Text = SumPio
    2. If chkGRB.Value = vbChecked then txtGRB.Text = AsHun
    3. ...etc
    4. ...etc

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Location
    in Poland
    Posts
    390

    Re: Problem with checkbox

    Thanks Bush, very thanks, it works fine.
    I know, I know, my English is bad, sorry .....

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