?
Solved

Application.filesearch - Access Runtime problem

Posted on 2003-11-20
5
Medium Priority
?
1,167 Views
Last Modified: 2009-07-29
Hi,

In my application, I have the following codes:

Dim  strNotePadFile  as string, ii as interger

With Application.FileSearch
        .LookIn = "C:\"
        .SearchSubFolders = True
        .filename = "Notepad.exe"
       
    If .Execute() > 0 Then
        MsgBox "There were " & .FoundFiles.Count & _
            " file(s) found."
        ii = .FoundFiles.Count
        strNotePadFile = .FoundFiles(ii)           'return the path of the last one found
    Else
        MsgBox "There were no files found."
    End If

End With
       
It works fine in my development computer. However, when I install the application to another computer and runs the application with Access Runtime, the Application.filesearch.execute fails.

how do I fix this?

0
Comment
Question by:Benita2003
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 7

Accepted Solution

by:
wsteegmans earned 510 total points
ID: 9795334
Can't find any info about it ...
Didn't try your example.

But why not using the traditional way, using Dir or the FileSystemObject?

Take a look here:
http://www.experts-exchange.com/Databases/MS_Access/Q_20367665.html
0
 
LVL 30

Assisted Solution

by:nmcdermaid
nmcdermaid earned 240 total points
ID: 9796751
Possibly its a reference problem.

Go into Tools/Referencs on the non-development computer and see if there are any missing libraries.
0
 

Author Comment

by:Benita2003
ID: 9797983
All the references are there.
Actually, before posting this question, I thought about using Dir but did not try it, and I searched helpfile and find FileSystemObject but it has very little information there and I did not try it either. I wonder why Application.Filesearch is not working with Access Runtime.

I will give them a try and let you guys know.
0
 
LVL 7

Expert Comment

by:wsteegmans
ID: 9798249
Check that you have included all DLLs in the run-time library.

In order to check it - in the code window goto Tools->References and see what DLL's or OCX's are checked.

In the line below you will see the source of the file, for example "C:\WINNT\SYSTEM32\form20.dll" and copy the file to run time library.
0
 
LVL 9

Expert Comment

by:ornicar
ID: 10066425
----------------------------------------------------------------------------------------
This question has been abandoned and needs to be finalized.
 You can accept an answer, split the points, or get a refund (information at http:/help.jsp#hs5)
  If you need a moderator to help you, post a question at Community Support (http:/Community_Support/)

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

ornicar
Cleanup Volunteer

---------------------------------------------------------------------------------------------
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question