|
-
May 31st, 1999, 09:33 AM
#1
Adding filenames to a recordset
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?
-
May 31st, 1999, 08:37 PM
#2
Re: Adding filenames to a recordset
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|