If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
You entered an expression that has an invalid reference to the property FileSearch
Many years ago I downloaded a sample database written by Arvin Meyer that
was a Document Manager. I modified it quite a bit, adding keywords so people could narrow their searches for files, but left the original code where it searches for all files in a selected folder and sub-folders as it was. There was also a feature to look for files that had been deleted. I upgraded it from older versions through Office 2003, then tried to run it today in Access 2007 and the function looking for deleted files errored out saying: You entered an expression that has an invalid reference to the property FileSearch. The code seems to get stuck on Set fs = Application.FileSearch and is used for this: If Len(Dir(rs!FilePath & rs!FileName)) = 0 Then ' the file isn't there rs.Edit rs!FileMoved = True rs.Update End If It seems that Access 2007 no longer supports Application.FileSearch. What is the work-around, or new code to do this? Thanks, Mich |
#2
|
|||
|
|||
You entered an expression that has an invalid reference to the property FileSearch
Mich,
find out about File Search for A2007 by typing the word FileSearch in the immediate window and pressing F1. Do the same for Application. Hopefully that will give any new information about how to use those methods in A2007. If no joy with this approach, download a new copy of Arvin's sample and use the common File/Open/Save api as used in Arvin's code. Jeanette Cunningham "M Skabialka" wrote in message ... Many years ago I downloaded a sample database written by Arvin Meyer that was a Document Manager. I modified it quite a bit, adding keywords so people could narrow their searches for files, but left the original code where it searches for all files in a selected folder and sub-folders as it was. There was also a feature to look for files that had been deleted. I upgraded it from older versions through Office 2003, then tried to run it today in Access 2007 and the function looking for deleted files errored out saying: You entered an expression that has an invalid reference to the property FileSearch. The code seems to get stuck on Set fs = Application.FileSearch and is used for this: If Len(Dir(rs!FilePath & rs!FileName)) = 0 Then ' the file isn't there rs.Edit rs!FileMoved = True rs.Update End If It seems that Access 2007 no longer supports Application.FileSearch. What is the work-around, or new code to do this? Thanks, Mich |
#3
|
|||
|
|||
You entered an expression that has an invalid reference to the property FileSearch
As it turns out the code was unused in the module, and now I am not even
sure it was from his original database as I had modified it a lot.. Set fs = Application.FileSearch was in the code, but fs never used. I deleted it and the rest of the code worked fine. I wasn't able to find the new copy of the sample database on Arvin's site - looking in the wrong place probably...! Thanks - Mich "Jeanette Cunningham" wrote in message ... Mich, find out about File Search for A2007 by typing the word FileSearch in the immediate window and pressing F1. Do the same for Application. Hopefully that will give any new information about how to use those methods in A2007. If no joy with this approach, download a new copy of Arvin's sample and use the common File/Open/Save api as used in Arvin's code. Jeanette Cunningham "M Skabialka" wrote in message ... Many years ago I downloaded a sample database written by Arvin Meyer that was a Document Manager. I modified it quite a bit, adding keywords so people could narrow their searches for files, but left the original code where it searches for all files in a selected folder and sub-folders as it was. There was also a feature to look for files that had been deleted. I upgraded it from older versions through Office 2003, then tried to run it today in Access 2007 and the function looking for deleted files errored out saying: You entered an expression that has an invalid reference to the property FileSearch. The code seems to get stuck on Set fs = Application.FileSearch and is used for this: If Len(Dir(rs!FilePath & rs!FileName)) = 0 Then ' the file isn't there rs.Edit rs!FileMoved = True rs.Update End If It seems that Access 2007 no longer supports Application.FileSearch. What is the work-around, or new code to do this? Thanks, Mich |
Thread Tools | |
Display Modes | |
|
|