open folder

Philmore

Registered User.
Local time
Today, 00:02
Joined
Dec 20, 2001
Messages
21
I have a module a database that creates folders using the value in the fname and lname field. I got some help to create this from this forum I now need some help to open these folders from within access using the fname and lname of the current record. can anyone help me please.
 
if you are trying to see what is in the particular folders do a VBA search for the FileSearch function which will return all files in a specified directory.

**FROM HELP**

Using the FileSearch Object

Use the FileSearch property to return the FileSearch object. The following example searches for the specified files and displays both the number of files found and the title of each found file.

With Application.FileSearch
If .Execute() > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no files found."
End If
End With

Use the NewSearch method to reset the search criteria to the default settings. All property values are retained after each search is run, and by using the NewSearch method you can selectively set properties for the next file search without manually resetting previous property values. The following example resets the search criteria to the default settings before beginning a new search.

With Application.FileSearch
.NewSearch
.LookIn = "C:\My Documents"
.SearchSubFolders = True
.FileName = "Run"
.MatchTextExactly = True
.FileType = msoFileTypeAllFiles
End With

**END OF HELP FILE**

Ian
 

Users who are viewing this thread

Back
Top Bottom