• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 306
  • Last Modified:

Access FileSearch Workaround

Hi,
My Access2000 app "expiry system" had the following code which won't work in 2003/2007 - they don't support .FileSearch.
Please could someone show me a workaround?
Thanks all
---------------------------------------
With Application.FileSearch
.NewSearch
.LookIn = "c:\"
.filename = "rctrits09.txt"
If .Execute() > 0 Then
GoTo expiry
End If
End With
0
englishman
Asked:
englishman
1 Solution
 
Rey Obrero (Capricorn1)Commented:
use the dir() function

dim sFile as string, fPath as string, fileName
fPath="c:\"
sfile=dir(fpath & "*.txt")

while sfile<>""
         filename=fpath & sfile

    sfile=dir
wend
0
 
TextReportCommented:
It seems strange that 2003 and 2007 don't support the filesearch and looking at http://support.microsoft.com/kb/870962/en-us it sould appear that this has been moved to Microsoft Office.

Cheers, Andrew
0
 
englishmanAuthor Commented:
thanks
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now