Debugging help needed:  Run-time error '70': Permission Denied

Posted on 2012-08-13
Last Modified: 2012-08-13
Can someone help me debug the attached.  What I have for Command4_Click() works perfectly.  I have just copied this and changed the import specification and table name for Command12_Click().  When I run Command12_Click(), I receive Run-time error '70': Permission Denied
Question by:kgittinger
    LVL 65

    Accepted Solution

    When in Debug mode, after it generates the error and the yellow bar is over the File Copy line, mouse over strInputFileName and strFileTemp and make sure they are correctly formatted paths and file names.

    If mousing over doesn't work, the go into your Immediate Windows (Ctrl-G), type ?strInputFileName {return} and ?strFileTemp  {return} to view what is in these variables.

    Author Closing Comment

    Thank you very much
    LVL 65

    Expert Comment

    by:Jim Horn
    Thanks for the grade.  Good luck with your project.  -Jim

    btw I HIGHLY recommend you do this:
    (1)  In any code window go to Tools:References
    (2)  Set a reference to 'Microsoft Scripting Runtime', a.k.a. File System Object
    (3)  In whatever free time you have play with the .FileExists and .FolderExists methods, as these will enable you to screen what the users enter for files, to make sure they are legit.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    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…
    Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  ( Here (http…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now