Importing file names in a Table

Danielf

Registered User.
Local time
Today, 21:00
Joined
Feb 21, 2000
Messages
103
Hi,

I have a folder with different files. I would like to import the name of
those files in a specific field of an access table .

Thanks for help

Daniel
 
see attached sample mdb that does what you need

Thank you very much but it doesn't work.

When I am clicking "Find files " , I am always receiving the following error message:
"Run-time error 2455" . You entered an expression that has an invalid reference to the property FileSearch.

I have tried different possibilities: with or withoiut filter, with or without
extension but I am always receiving the same error message.

Thank for your help

Daniel
 
Have you looked at your tools and references to make sure you are all referenced up. At what point did it throw the error?

David
 
Have you looked at your tools and references to make sure you are all referenced up. At what point did it throw the error?

David

Directly when clicking "Find Files" I have the error in VBa at this point
"With Application.FileSearch" ( is in yellow)

I don't understand what you mean by "Have you looked at your tools and references to make sure you are all referenced up"

Daniel
 
Design a standard module and select Tools > References you will get a dialog box check to see if any are prefixed with MISSING. It is likely that you need to reference Microsoft Scripting Runtime

David
 
Design a standard module and select Tools > References you will get a dialog box check to see if any are prefixed with MISSING. It is likely that you need to reference Microsoft Scripting Runtime

David

I have referenced to "Microsoft Scripting Runtime " but it still doesn't work

Daniel
 
Check out the fScanDirSelectFileFromTable form in my Browse [Find a directory or file] sample db.

Thank you for your answer

When I click export (in "Browse for a directory module") it is exporting a report (*.rtf extension) to a directory but the report is almost empty. There is only-inside- a rectangle and the name of the directory. but not the names of the files of this directory.

Daniel
 
As I stated above, you need to open the "fScanDirSelectFileFromTable" form in my Browse [Find a directory or file] sample db. My db will auto fill the files from your C:\Windows\ directory into the "tFiles" table. You just need to tweak the code to scan the directory you want.
 

Users who are viewing this thread

Back
Top Bottom