Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 8th, 2007, 04:57 AM
Authorized User
Points: 110, Level: 2
Points: 110, Level: 2 Points: 110, Level: 2 Points: 110, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2007
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default File Search

I'm using the following code to make sure that a specific file exists.
On Access 2003 it works fine but on Access 2007 I get an error 2455 on the "FileSearch".

  Set fs = Application.FileSearch
  With fs
     .LookIn = "C:\Windows"
     .FileName = "HebDates.DLL"
     If .Execute > 0 Then
     Else
         MsgBox "File is missing"
         Application.Quit
         Exit Sub
     End If
  End With

 
Old October 9th, 2007, 06:58 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Appendix G in Access 2007 VBA Programmer's Reference states:

"FileSearch object:
This object has been deprecated in Office 2007. You should use the FileSystemObject instead."

http://wrox.books24x7.com

Did that help?




mmcdonal
 
Old October 10th, 2007, 02:09 AM
Authorized User
Points: 110, Level: 2
Points: 110, Level: 2 Points: 110, Level: 2 Points: 110, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2007
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you mmcdonal, It Helped.:)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Search a file on my server deepquiet25 C# 5 August 29th, 2007 02:21 AM
I need search a file on my server deepquiet25 ASP.NET 1.0 and 1.1 Basics 0 August 28th, 2007 05:07 PM
File Search / Indexing Search with .net 2.0 maulik77 ASP.NET 1.0 and 1.1 Basics 2 March 15th, 2007 12:45 AM
file search method esfaryn Excel VBA 0 November 4th, 2005 04:14 AM
Search for a particular file snowydust VB How-To 0 July 19th, 2004 05:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.