Z
Zak
Hello,
I need some help trying to grab the data selected from a checkboxlist. The
checklist is acting like a menu. The first selection is accepted but not the
multiple ones. For example is the user selects "Checked Baggage" the
selection is stored the correct procedure is processed, but if the user
selects "SIDA" along with the "Checked Baggage" there is no stored data,
just that first selection. Just the first entry is saved. Can someone help
me figure out how to get multiple selections stored so I can get this menu
to work? Thanks in advance for the assistance!
Dim item As ListItem
For Each item In cklAirportAreas.Items
If item.Selected = True Then
Select Case item.Text
Case "Checked Baggage"
CheckedBaggage = "Yes"
Case "Cargo"
Cargo = "Yes"
Case "Checkpoint"
Checkpoint = "Yes"
Case "Terminal"
Terminal = "Yes"
Case "SIDA"
SIDA = "Yes"
Case "AOA"
AOA = "Yes"
Case "Perimeter"
Perimeter = "Yes"
Case "Other"
Other = "Yes"
Case Else
MsgBox("An error has occurred please try again!")
End Select
End If
Next
Whatever is selected in from the Checkboxlist is accepted but when the
program goes to the next sections is where I get the issue:
'First button
If CheckedBaggage = "Yes" Then
plCkBaggage.Visible = True
Else
If Cargo = "Yes" Then
plCargo.Visible = True
Else
If Checkpoint = "Yes" Then
plCheckpoint.Visible = True
Else
If Terminal = "Yes" Then
plTerminal.Visible = True
Else
If SIDA = "Yes" Then
plSIDA.Visible = True
Else
If AOA = "Yes" Then
plAOA.Visible = True
Else
If Perimeter = "Yes" Then
plPerimeter.Visible = True
Else
If Other = "Yes" Then
plOther.Visible = True
End If
End If
End If
End If
End If
End If
End If
End If
End Sub
okay the program goes through this correctly but the next section, it
doesn't. I am trying to use the checkboxlist as a menu....The user selects
for example Checked Baggage, and then selects Cargo...well it goes to
Checked Baggage, the first on the list but not the next one, Cargo....here
is the code..
'Second button where there is no data....
If Cargo = "Yes" Then
plCargo.Visible = True
Else
If Checkpoint = "Yes" Then
plCheckpoint.Visible = True
Else
If Terminal = "Yes" Then
plTerminal.Visible = True
Else
If SIDA = "Yes" Then
plSIDA.Visible = True
Else
If AOA = "Yes" Then
plAOA.Visible = True
Else
If Perimeter = "Yes" Then
plPerimeter.Visible = True
Else <<<<<<<<<<For some reason instead of
going to Cargo it goes here....
If Other = "Yes" Then
plOther.Visible = True
Else
plCCTVNeeds.Visible = True
End If
End If
End If
End If
End If
End If
End If
Please help me fix this problem. Thank you.
I need some help trying to grab the data selected from a checkboxlist. The
checklist is acting like a menu. The first selection is accepted but not the
multiple ones. For example is the user selects "Checked Baggage" the
selection is stored the correct procedure is processed, but if the user
selects "SIDA" along with the "Checked Baggage" there is no stored data,
just that first selection. Just the first entry is saved. Can someone help
me figure out how to get multiple selections stored so I can get this menu
to work? Thanks in advance for the assistance!
Dim item As ListItem
For Each item In cklAirportAreas.Items
If item.Selected = True Then
Select Case item.Text
Case "Checked Baggage"
CheckedBaggage = "Yes"
Case "Cargo"
Cargo = "Yes"
Case "Checkpoint"
Checkpoint = "Yes"
Case "Terminal"
Terminal = "Yes"
Case "SIDA"
SIDA = "Yes"
Case "AOA"
AOA = "Yes"
Case "Perimeter"
Perimeter = "Yes"
Case "Other"
Other = "Yes"
Case Else
MsgBox("An error has occurred please try again!")
End Select
End If
Next
Whatever is selected in from the Checkboxlist is accepted but when the
program goes to the next sections is where I get the issue:
'First button
If CheckedBaggage = "Yes" Then
plCkBaggage.Visible = True
Else
If Cargo = "Yes" Then
plCargo.Visible = True
Else
If Checkpoint = "Yes" Then
plCheckpoint.Visible = True
Else
If Terminal = "Yes" Then
plTerminal.Visible = True
Else
If SIDA = "Yes" Then
plSIDA.Visible = True
Else
If AOA = "Yes" Then
plAOA.Visible = True
Else
If Perimeter = "Yes" Then
plPerimeter.Visible = True
Else
If Other = "Yes" Then
plOther.Visible = True
End If
End If
End If
End If
End If
End If
End If
End If
End Sub
okay the program goes through this correctly but the next section, it
doesn't. I am trying to use the checkboxlist as a menu....The user selects
for example Checked Baggage, and then selects Cargo...well it goes to
Checked Baggage, the first on the list but not the next one, Cargo....here
is the code..
'Second button where there is no data....
If Cargo = "Yes" Then
plCargo.Visible = True
Else
If Checkpoint = "Yes" Then
plCheckpoint.Visible = True
Else
If Terminal = "Yes" Then
plTerminal.Visible = True
Else
If SIDA = "Yes" Then
plSIDA.Visible = True
Else
If AOA = "Yes" Then
plAOA.Visible = True
Else
If Perimeter = "Yes" Then
plPerimeter.Visible = True
Else <<<<<<<<<<For some reason instead of
going to Cargo it goes here....
If Other = "Yes" Then
plOther.Visible = True
Else
plCCTVNeeds.Visible = True
End If
End If
End If
End If
End If
End If
End If
Please help me fix this problem. Thank you.