Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pulling my hair out, Pleez Help

Status
Not open for further replies.

kiwiCoder

Technical User
Aug 2, 2001
45
NZ
The array is declared as dynamic and i is set to 0 via a cmdButton that is used before this sub is activated. Iwant the array to increment each time this click event is fired, storing the result each time. Can anyone see whats wrong please, I'm a newbie.


Private Sub lblSeat_Click(Index As Integer)
Dim Found As Boolean
Dim CurIndex As Integer
Dim msgResponse As Integer
If CheckOpt(Found) Then 'No type selected(Adult,Child etc)
Exit Sub
End If
MsgBox i, , "First Check"
CurIndex = lblSeat(Index).Index
ReDim Preserve SeatNumAray(i To x)
If SeatNumAray(i) = "" Then
x = i + 1
ReDim Preserve SeatNumAray(i To x)
SeatNumAray(i) = lblSeat(Index).Tag
Else
i = i + 1
x = x + 1
ReDim Preserve SeatNumAray(i To x)
SeatNumAray(i) = lblSeat(Index).Tag
End If
MsgBox SeatNumAray(i), , "BlaBla"
If lblSeat(CurIndex).BackColor = &H80000009 Then 'White'ish
lblSeat(CurIndex).BackColor = SeatColor
SeatRecs (CurIndex) ' Save the seat record here
Exit Sub
Else
msgResponse = MsgBox("You cannot re-select this seat" & vbCrLf & "Would you like to change this seat booking?", vbExclamation + vbMsgBoxHelpButton + vbYesNo, "WARNING")
If msgResponse = vbYes Then
Call lblSeat_DblClick(CurIndex) 'Hopefully use this to Delete the present record for this seat and allow the user to re-select
End If
Exit Sub
End If
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top