Narrow Search Results in Access
- From: BTU_needs_assistance_43 <BTUneedsassistance43@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 8 Jul 2009 12:56:01 -0700
I've got a chunck of code written that will search for all the .xls files in
a certain folder. That parts great. What isn't great is that the program
searches for ALL .xls files when I only need ones added in the last week or
so. While the .LastModified command works in Excel it will NOT work in Access
and instead of bringing up recent files it brings up all of them. How do I
get this command to work in Access?
With Application.FileSearch
.NewSearch
.LookIn = "C:\Documents and Settings\i62793\Desktop\Rough Drafts\MY
EXPERIMENTS\Cast Report Examples"
.SearchSubFolders = True
.LastModified = msoLastModifiedLastWeek
FileType = msoFileTypeExcelWorkbooks
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
strLocation = (.FoundFiles(i))
....
.
- Follow-Ups:
- RE: Narrow Search Results in Access
- From: David H
- RE: Narrow Search Results in Access
- Prev by Date: RE: Lost Records
- Next by Date: RE: Transfer Spread***... setting parameters, etc.
- Previous by thread: Do While Loop code
- Next by thread: RE: Narrow Search Results in Access
- Index(es):