A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

You entered an expression that has an invalid reference to the property FileSearch



 
 
Thread Tools Display Modes
  #1  
Old April 28th, 2008, 07:58 PM posted to microsoft.public.access.forms
M Skabialka
external usenet poster
 
Posts: 570
Default 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  
Old April 28th, 2008, 11:19 PM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default 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  
Old April 30th, 2008, 03:02 PM posted to microsoft.public.access.forms
M Skabialka
external usenet poster
 
Posts: 570
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.