Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Permission denied (Access 2000)

    I cannot delete a database witht the command Kill ("C:bebe.mdb"). I get the error Permission denied.Obviously the error lies somwehere within my code, since when i use the command outside the code, in a new form, it is OK.
    I couldnt find the reason in my code. is it possible somehow to get through this and delete the database ?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Permission denied (Access 2000)

    The name be.mdb suggests that it concerns a backend database. Do you have a form open that is based on a table or tables linked to the backend? Or have you opened the backend in code, using OpenDatabase?

  3. #3
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Permission denied (Access 2000)

    Yes i have a function for linking and the form is based also to that link, but the function is set to Nothing. Also, even when i close the form and open a new form, the eror permission denied continues

    Public Function LinkProducts()
    Dim wsp As DAO.Workspace
    Set wsp = DBEngine.Workspaces(0)
    Dim strPassword As String
    strPassword = "secret"
    Dim dbs As DAO.Database
    Set dbs = wsp.OpenDatabase("C:BEBE.mdb", False, False, ";PWD=" & strPassword)
    DoCmd.TransferDatabase acLink, "Microsoft Access", "C:bebe.mdb", acTable, "products", "products1"
    dbs.Close
    Set dbs = Nothing
    End Function

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Permission denied (Access 2000)

    Why do you want to delete the backend database from a database that is linked to that backend? That makes no sense to me.

  5. #5
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Permission denied (Access 2000)

    Because we must send back all the tables to the back end and then we have problems with the relations.When related the tables are difficult to be deleted.Also the back end bloats and is difficult to resend

  6. #6
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Permission denied (Access 2000)

    Just to add, at first i make a new database, send the tables to this database, then kill the old database and then rename the new database. It works fine unless i have a record source linked with the database.Is there any function to close all the forms and relations ? Because if i oppen a new form and there i clikc the kill funcion, it works. But if i open this form with a code, it doesnt work.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Permission denied (Access 2000)

    If you have problems with the size of the backend database, you should compact and repair it from time to time (in effect, this creates a new, compacted copy of the database).

    If you still want to delete the backend, you should do so from a form that is not bound to a linked table, and you should take care that there are no other users who have the backend open.

Posting Permissions

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