I got a big problem with my values , checkboxes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • carl2k2
    New Member
    • Mar 2008
    • 15

    #1

    I got a big problem with my values , checkboxes

    Ok, I have 5 categories each have their own price, example of the code:

    Code:
    If CHKcat1.Value = 1 Then
    LBLprice.Caption = "£20"
    LBLinfo.Caption = "Hello"
    Else
    LBLprice.Caption = ""
    LBLinfo.Caption = ""
    LBLpxvat.Caption = ""
    LBLtotalprice.Caption = ""
    End If
    
    If CHKcat1.Value = 1 Then
    LBLtotal.Caption = ""
    Else
    LBLtotal.Caption = ""
    End If
    But I have 3 events, and each event must have different 'category price'

    ----
    I have 2, first you select the event, then it brings you to the booking form, so I want it so that when an event is selected the price of the tickets(categor ies)



    Would I have to edit each category so, CHKcat1 would have to be(I dont know the code correctly)

    If event1.value = 1 and CHKcat1.Value = 1 Then
    LBLtotal.Vaptio n = "50"
    End if

    but wouldnt i need to set every event in each category like

    If event2.value = 1 and CHKcat1.Value = 1 Then
    LBLtotal.Vaptio n = "50"
    End if
    If event3.value = 1 and CHKcat1.Value = 1 Then
    LBLtotal.Vaptio n = "50"
    End if

    etc



    But obviously VB won't recognise that, so wondering if anyone would know the solution?
  • carl2k2
    New Member
    • Mar 2008
    • 15

    #2
    As I have been testing this :), I came up with this code, and so far seems to work, although I still need to test it, but am I going along the right lines??

    Code:
    If (Form2.Check1.Value = 1) And (CHKcat1.Value = 1) Then
    LBLprice.Caption = "£20.00"
    LBLinfo.Caption = "Hello"
    End If

    Comment

    Working...