General discussion

Locked

VB6 Indexing

By eclipse63oooo ·
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

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Juergen Hartl In reply to VB6 Indexing

You could have a control array (labels) then use the array index to link to the database.

Collapse -

by Juergen Hartl In reply to

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

Collapse -

by eclipse63oooo In reply to VB6 Indexing

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.

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums