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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Checkboxes and Listbox Items

Status
Not open for further replies.

iamsmahd

Programmer
Jun 16, 2003
9
IR
Hi.
I have a form in my VB6.0 project which has 1 listbox
and a frame containing 6 checkboxes.
now, I want to set these chekboxes for each item
of the listbox (checked or unchecked) in a way that when I click on each item I can set these checkboxes checked or unchecked
and when I go to the other item in the listbox,
I can do so but the settings (check boxes) for previous
item does not distroy.....and when I come back I can see them
Now, If i do not wat to save the setting in DB(after checking then sending to DB not now), what
is your solution to do so?

thanks in advance
 
do you mean you have 6 options for every line in the list box? And you want to save the state of the options for each line item?
 
Yes exactly , but not saving in DB now......first setting
option for every line item, controling them after setting
by traversing the listbox and seeing options set for every item
then send this settings to DB.now,what is your solution?

 
you could use a dynamically created recordset to do this or just an array to hold the values.
If you used a 1 dimesional array your array size would be 6 times the number of items in your list box. Then you would access the valuse via the indexes like

(listbox.listindex * 6) to (listbox.listindex * 6) + 5

or you could use a 2 dimesional array.

Just some ideas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top