If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > How can I export a record from 1 list box to another?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-15-04, 04:25
YevSnow YevSnow is offline
Registered User
 
Join Date: Mar 2004
Posts: 118
Question How can I export a record from 1 list box to another?

Hi,


I need to export several records using multiselect from 1 list box to another. I am using the code found in the help file, but I am not sure how to make the reccords appear in the second list box. Here is what I have so far:

------------------------------------------------------------------------
Private Sub selRecord_Click()

Dim frm As Form
Dim ctl As Control
Dim exp As Control
Dim varItm As Variant

'sets name of the form to "frm"
Set frm = Forms!Form1
'sets name of the first list to "ctl"
Set ctl = frm!List2
Set exp = frm!expList

'loop for getting each item selected and passing it into an array
For Each varItm In ctl.ItemsSelected

MsgBox ctl.ItemData(varItm)


Next varItm

End Sub

-------------------------------------------------------------------------


What I need to do in the end is import those records into a temp table created with a random name. And it needs to be the entire record... But right now I would really appreciate a little help with this first bit.

Thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On