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
Solved

Access unexpected error 53: File not found

Posted on 2013-06-21
2
629 Views
Last Modified: 2013-06-26
I have the following code in an onclick event of a label on a form but once in a while the user gets this message:

Access unexpected error 53: File not found

and the user is not directed to the server folder.

Does anyone know what this is all about and perhaps have a solution?


Private Sub Label241_Click()

    'Copied over from frmPartsMasters
    Dim stAppName As String

    On Error GoTo errhand

    stAppName = "C:Windows\explorer.exe \\D5XR1BP1\Company\General Shared Files\PRINTS\" & Me.txtPartN & "\"
    Dim d As Double
    Dim dty As String
    dty = "\\D5XR1BP1\Company\General Shared Files\PRINTS\" & Me.txtPartN
    If Len(Dir("\\D5XR1BP1\Company\General Shared Files\PRINTS\" & Me.txtPartN & "\")) = 0 Then
        MkDir ("\\D5XR1BP1\Company\General Shared Files\PRINTS\" & Me.txtPartN)
        MsgBox "Folder has been created on server.  Remember to place image files in this folder."
    End If

    Call Shell(stAppName, 1)
   
    Exit Sub
errhand:
    If Err.Number = 75 Then
    ' probably directory exists but empty
    ' ignore
    Resume Next
Else
    MsgBox "Unexpected error " & Err.Number & " : " & Err.Description
    Resume Next
End If

Exit_cmdExplore_Click:
    Exit Sub

Err_cmdExplore_Click:
    MsgBox Err.Description
    Resume Exit_cmdExplore_Click

End Sub
0
Comment
Question by:SteveL13
2 Comments
 
LVL 7

Accepted Solution

by:
dec0mpile earned 500 total points
ID: 39266341
You are going to a network share. Sometimes even though users are logged into the domain, shares do not work or credentials do not authenticate (I've seen this behaviour with 2003 domain controllers, but its possible with all editions). Reboot usually fixes this problem. That's probably the reason why sometimes you see file not found error.

Try to replace the name of the server with the IP in all cases and see if that works better.

EX:
Instead of: \\D5XR1BP1\Company\General Shared Files\PRINTS\
Try: \\192.168.0.10\Company\General Shared Files\PRINTS\

Replace 192.168.0.10 with the proper IP
0
 
LVL 45

Expert Comment

by:aikimark
ID: 39267831
Since you have a space in the path name, you need to surround the path with quote characters.  You can do that with a quote character literal in the string (doubled, of course) or concatenate a couple of Chr(34) values into the string.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Single Step Macro 4 39
Spell checker for VBA 4 28
File.Search issue 8 28
Access 2010 get Name of local computer from Terminal server 19 46
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

789 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