So i have 2 listboxes, lstSource and lstDestination, lstSource takes it data from Resource table.
What i need to do is move list items one by one from lstSource to lstDestination and vice versa.
What i am doing right now is this,
Expand|Select|Wrap|Line Numbers
- Private Sub cmdMoveToList2_Click()
- On Error GoTo Err_cmdMoveToList1_Click
- If Me.lstSource.ListIndex >= 0 Then
- Me.lstDestination.AddItem Me.lstSource.ItemData(Me.lstSource.ListIndex)
- End If
- Exit_cmdMoveToList1_Click:
- Exit Sub
- Err_cmdMoveToList1_Click:
- MsgBox Err.Description
- Resume Exit_cmdMoveToList1_Click
The problem i am facing is that when i click on the icon to move from lstSource to lstDestination it adds not the ResourceName(which is the list value) but the corresponding Resource ID (which is the primary key of Resource Table).
And also since the row source type for lstSource is table/query, lstDestination to lstSource moving is not happening.
Pls advise.
Thanks,
Arya