Hello,
i want to delete my database using Kill App.Path & "\pcdb.mdb"
but the error message cmoes "ACCESS DENIED"

the full code is :

Private Sub CmdRestore_Click()
If Db.State = 1 Then
Db.Close
End If

SetAttr App.Path & "\Pcdb.mdb", vbNormal
Kill App.Path & "\pcdb.mdb"

If Db.State = 0 Then
On Error GoTo PerErr
FileCopy Direc & "\" & FileName, App.Path & "\pcdb.mdb" '& Format(Date, "dd/mm/yyyy") & ".mdb"
MsgBox "Restore completed ", vbInformation, "Restored"
SetAttr App.Path & "\Pcdb.mdb", vbHidden

PerErr: 'Access Permission (If Database is in use)
If Err.Number = 75 Then
MsgBox "Database is in use. Unable to create backup", vbCritical, "Database is in use"
Exit Sub
End If
End If

End Sub


please help me