|
-
Jul 2nd, 2007, 03:13 AM
#1
Thread Starter
Member
[2005] Listbox Selected Items
Hi There,
I'm still struggling. I want the user to select only eight items and then I would like to add those eight Selecteditems to a table in Access a database. How do I add Listbox Selected items to a table?
-
Jul 2nd, 2007, 09:00 AM
#2
Re: [2005] Listbox Selected Items
Hi
Just add an insert sql statement in the middle the cycle.
How to browse the selected items of a ListBox
Code:
For i As Int32 = 0 To Me.ListBox1.SelectedItems.Count - 1
Console.WriteLine(Me.ListBox1.SelectedItems(i).ToString)
Next
"The dark side clouds everything. Impossible to see the future is."
-
Jul 2nd, 2007, 09:10 AM
#3
Thread Starter
Member
Re: [2005] Listbox Selected Items
Hi,
thanks for your help I highly appreciate it, but now instead of retrieving each column I'm retrieving rows.
-
Jul 2nd, 2007, 09:19 AM
#4
Re: [2005] Listbox Selected Items
Is this you wanted ?
Code:
Dim sSelitem() As String
ListBox1.SelectedItems.CopyTo(sSelitem, 0)
This will copy the selected item into a string array
-
Jul 3rd, 2007, 01:01 AM
#5
Thread Starter
Member
Re: [2005] Listbox Selected Items
Hi
Thanks for your help it works just fine.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|