Results 1 to 3 of 3

Thread: Filecopy Function

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Posts
    1,374

    Filecopy Function

    I have a form with :

    -Drive list box
    -Directory list box
    -Save button

    The form appears when the application is closed down so that the user can back up their database file to the selected drive/directory.

    The save button has the "FileCopy" function attached.

    When I click on "Save" I get run time error 70 "Permission Denied". Presumably this is occurring because the application is still linked to the database. When the application is running, the .mdb file has a .ldb file with same name. I cannot copy the .mdb file until the .ldb file is closed. The connection is made using ADO.

    How to I terminate the application's link to the database so that I can use the filecopy function? I have tried :

    adoconnection.close
    Set adoconnection = Nothing

    with no success.

  2. #2
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    Try putting the close routine on the form unload event!
    Then put the save button(the one with the filecopy) on another form that loads when the form is closed!

    Click it and try!

  3. #3
    New Member
    Join Date
    Nov 2000
    Location
    Bayamon, Puerto Rico
    Posts
    10

    Talking

    I was working with a project with the same problem. Besides what Beacon says, a good prevention tip is to make sure that the database is not in use.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width