Results 1 to 3 of 3
  1. #1
    ricksil is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    10

    Getting Permission Denied error when moving file

    Hi,



    This code:

    Code:
    If [Forms]![Navi]![txtsql] = 1 Then
      Set FSO = CreateObject("Scripting.FileSystemObject")
      FSO.MoveFile "C:\Users\larry\Documents\Folder_01122016\" & strFile, _
                    "C:\Users\larry\Documents\FILE_FAILED\"
    End If
    is producing a permission denied error when trying to move an XML files. (It seems to work for Excel files). I know that there is no permissions issue here because I can move the file outside of Access.

    Do I need to close the XML file or something? If so, how?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    try using full path names, src and target.
    make sure the file is not attached in access, or open

  3. #3
    ricksil is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    10
    Thanks for the response! Is there a function I could call that would tell me if the file is "attached" or open? How can I close the file?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Microsoft Access 2.0 Database User and Group Permission Error
    By uralbystreet in forum Code Repository
    Replies: 5
    Last Post: 02-10-2014, 10:33 AM
  2. Replies: 3
    Last Post: 01-06-2014, 11:01 PM
  3. Replies: 3
    Last Post: 09-01-2010, 08:43 PM
  4. Moving a back-end file
    By Ted C in forum Security
    Replies: 1
    Last Post: 08-06-2010, 12:33 PM
  5. MDB ACCESS DENIED
    By Texaine in forum Security
    Replies: 0
    Last Post: 10-10-2006, 08:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums