RobP
May 31st, 1999, 09:33 AM
I am selecting multiple files from a FileListBox and displaying them in a ListBox in one form. Now I would like to put this list of filenames in a recordset in a different form. Any ideas on the code to accomplish this?
Huynh Quang Cuong
May 31st, 1999, 08:37 PM
Hello,
It is easy!
First, declare a Recordset variable so that both Form can se it (in a standard module)
Public rsFiles as ADODB.Recordset
'<<Code in form with listbox>>
Private sub PutFileNameToRs()
with rsFiles
.Fields.Append "FileName",adBSTR,200
'You can append more field
.Open 'Open this Recordset
'Loop here to add all ListBox item to
'this recordset
'''''Use code like that
.Addnew
.Fields("FileName")="ListBox Item here"
End with
End sub
Bye,
H.Q.Cuong