Discussion Locked

VB6 Indexing

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am attempting to layout a floor plan so that the background color of the label boxes, (rooms), is different for vacant rooms. Upon click_on the room, if empty, the room number is input to a form that is filled out for the new occupant. If the room is occupied, then clicking on the room will display info about the occupant that is maintained in a database.

I am having a problem tying together the empty room number to the empty form to update the databse. I also am having a problem in referencing the database using the room number.

Thanks

3 replies

by juergen hartl

Private Sub Label1_Click(Index As Integer)
select case index
case 1
' do whatever to room 1
case 2
' do whatever to room 5 (let's say there is
' no rooms 2-4)
case 3 whatever to room 6
...
end select
End Sub

by eclipse63oooo

I have attempted this process. The devil is in the details. How do I link lblDesk(53) to the database entry room 2045? Would my index have to be in the same order as that of my room numbers? Does having gaps in the indexing matter?

Thanks for the reply.

This discussion is closed to new replies.