In Access 2002, when I run the code shown below to search for a file, the execute step runs for 5+ minutes and finds 15 files.
If I just use the Windows startup menu search tool I get the same 15 files and it takes maybe 3 seconds.
Is there any way to make VB run this faster???
By the way, by trial and error it seems that if lastimportdate includes a time (ie, is not an integer) then .execute finds NO files. Has anyone else noticed this?
Code start:-----------
lastimportdate=#7/8/2003#
with application.filesearch
.newsearch
.lookin="f:\rawdata\qa"
.filetype=msofiletypeallfiles
.searchsubfolders=true
.propertytests.add "last modified",msoconditiononorafter,lastimportdate
if .execute > 0 then
[do some stuff]
end if
end with
Code end---------------------
If I just use the Windows startup menu search tool I get the same 15 files and it takes maybe 3 seconds.
Is there any way to make VB run this faster???
By the way, by trial and error it seems that if lastimportdate includes a time (ie, is not an integer) then .execute finds NO files. Has anyone else noticed this?
Code start:-----------
lastimportdate=#7/8/2003#
with application.filesearch
.newsearch
.lookin="f:\rawdata\qa"
.filetype=msofiletypeallfiles
.searchsubfolders=true
.propertytests.add "last modified",msoconditiononorafter,lastimportdate
if .execute > 0 then
[do some stuff]
end if
end with
Code end---------------------