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

Bound Column Property

Status
Not open for further replies.

NewfieGolfer

Technical User
Mar 29, 2001
80
CA
I have a listbox with multiple columns. The table for the listbox also has multiple columns. I currently am able to have multiple selections of the table copied to a temp table after clicking a button, the problem is that only the info in column one is copied to the table. I need to copy the info in all the columns to the temp table.

ex.

ID Price Sq. Feet
1 8.00 23 <-- selected
2 9.50 12
3 5.50 34 <-- selected



I use the sample code below to copy selected:

'*****************************************************
Dim rcs As Object
Dim item As Variant

Set rcs = CurrentDb.OpenRecordset(&quot;ExampleTable&quot;)

With rcs
For Each item In List1.ItemsSelected
rcs.AddNew
!ID= List1.ItemData(varItem)
rcs.Update
Next item
End With

'*****************************************************

I need temp table to look like below:

ex above:

ID Price Sq. Feet
1 8.00 23
3 5.50 34



 
Try accessing the 'Column' property of the listbox. You can specify row and which column information you want from it. I seem to recall a thread in Tek-tips that actually has an example somewhere.

Gary
gwinn7
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top