NewfieGolfer
Technical User
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("ExampleTable"
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
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("ExampleTable"
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