trying to link access to windows search command

sha7jpm

Registered User.
Local time
Today, 23:03
Joined
Aug 16, 2002
Messages
205
well, my boss has seemingly asked the impossible, I cannot find a solution but maybe someone can help...

I have a an access dbase that stores info about projects...
each project is 1 file.
in another drive and directory are all the files which make up this final file.

does anyone know of a way to make access go into windows, go to the correct directory.. (assume this could be done with some kind of hyperlink?)

then count all the relevent files and populate a field with the number of files... phew!

I assume that it is possible because in essence we are just running a search.. based on certain criteria...

just am completely stumped..

ta

John.:confused:
 
ta!

many thanks Mile...

I had tried a search on the forum, but missed that one..

much appreciated..

John.:)
 
Whoops! I deleted the link because none of the hyperlinks within it were taking me anywhere.

Here is is again, just in case I'm the only one not getting to it: click here
 
no it is me also!

I am having the same problem...

will email Jon and see if he can tell if it is a forum error...

thanks

john.
 
Looking at the difference in the URL those links post to and the current URL style, I'd guess that they link to posts on a now defunct version of this forum.
 
Try This

Dim intCount As Integer, varFile As Variant, objFileFind As Object

Set objFileFind = Application.FileSearch 'FindFiles

'Find the Files
With objFileFind
.NewSearch
.Filename = "*.mdb" 'or whatever you want to find
.LookIn = "YOUR SEARCH DIRECTORY"
.SearchSubFolders = True 'if you have subfolders to search also
.Execute

'Count the files found
intCount = 0
For Each varFile In .FoundFiles
intCount = intCount + 1
Next varFile
End With
 
Thanks!

thanks to you both, I have looked at the threads and the code and it works really well, am going to attempt to complicate it slightly, so may be back with a confused look!

many thanks again...

john.:p
 

Users who are viewing this thread

Back
Top Bottom