Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21243

Application.FileSearch

$
0
0
Hi,

I am working with Microsoft Access 2010. I have an application which was developed in Access 2003 and is using the Application.FileSearch command.

This command is not present in Access2010 please could anyone check and update the code to cater for the FileSearch..

Code:

Sub Search2()
On Error GoTo Search_Err

    Dim strPrompt As String, strTitle As String
   
   
    ChDir AttachmentPath  ' Changes directory to new file path
                     
    Dim i As Integer
    With Application.FileSearch
        .LookIn = AttachmentPath
        .FileName = Fname
        If .Execute > 0 Then
            AttachST = 1
        Else
            AttachST = 0
            Exit Sub
        End If
    End With

Search_Exit:
    Exit Sub

Search_Err:
    MsgBox "File Path Not Found (" & Error$ & ")", vbInformation, vbNullString
    Resume Search_Exit

End Sub

Thank yoo ever so much

Viewing all articles
Browse latest Browse all 21243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>