Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select File name, but not the file

Status
Not open for further replies.

DrDan1

Technical User
Oct 2, 2002
127
GB
Hi. I was hoping that there is a way of selecting a nuber of files and having the file names added to a field in a table. e.g. selecting a folder of 30 video files and they're updated to the access table as 30 new records, without having to type out out the filename of each file.

I've played around loads but can't figure it out. Thanks.
-Dan.

----------------------------------------
Knowing is not enough, we must apply. Willing is not enough, we must do.
--So said the ever wise Bruce Lee
Memorize and live by it!
 
Is this wot u want?

dim filename as string
dim rs as recordset

set rs = currentdb.openrecordset("table_name")

filename = dir(path_to_Folder)
do while filename <> &quot;&quot;
rs.addnew
rs!fieldname = filename
rs.update
filename = dir
loop
 
Thanks, I think so. Haven't been able to try it yet. Will be able to tonight, but will this allow the user to select a number of files, click an ok button and everything will be updated?

----------------------------------------
Knowing is not enough, we must apply. Willing is not enough, we must do.
--So said the ever wise Bruce Lee
Memorize and live by it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top