When you try to run the
FileSearch function in Microsoft Office Access 2007, you
receive the following error message:
You entered an
expression that has an invalid reference to the property
FileSearch.
This problem occurs if the
FileSearch function was created in an earlier version of Access.
The
File Search task pane and the
FileSearch object have been removed from
the 2007 Microsoft Office programs.
To programmatically search for a file in Access 2007, you can
use either the
Dir function or the
FileSystemObject class.
For more information about the
Dir function, visit the following Microsoft Web site:
The
FileSystemObject class was originally created for the Microsoft Visual Basic Scripting Edition. The
FileSystemObject class is not included in the Visual Basic for Applications object
library. To use the
FileSystemObject class, you must select
Microsoft Scripting
Run-time (Scrrun.dll) in the
References dialog box
for the project.
For more information about the FileSystemObject class, click the following article numbers to view the articles in the Microsoft Knowledge Base:
For more information, click the
following article number to view the article in the Microsoft Knowledge Base: