Error 70 (Permission denied) deleting remotely linked word.doc in unbound object frame

M

Mike Watson

I've got an unbound object frame in an Access 2000 form. I keep the
full file paths of word docs in a table. The table is in an Access
database on a remote file share. The docs are in a remote file share.

When the user navigates to a rec in table the On Current event of the
form sets the frame to the current word document:

Dim ole As ObjectFrame

If Not IsNull(Me!txtPrestazioneID) Then
Set ole = Me!oleLettera
With ole
.SourceDoc = Me!txtFilePath
.Action = acOLECreateLink
End With
End If

If the user deletes the rec I try to first try to unlink the doc from
the frame and delete the file:

Set ole = Me!oleLettera
With ole
.SourceDoc = ""
.Action = acOLEDelete
End With

Kill Me!txtFilePath


The Kill statement provokes Error 70, Permission denied.

Can anyone help?
 
E

Emilia Maxim

---------- [email protected] (Mike Watson) said:
I've got an unbound object frame in an Access 2000 form. I keep the
full file paths of word docs in a table. The table is in an Access
database on a remote file share. The docs are in a remote file share.
If the user deletes the rec I try to first try to unlink the doc from
the frame and delete the file:

Set ole = Me!oleLettera
With ole
.SourceDoc = ""
.Action = acOLEDelete
End With

Kill Me!txtFilePath

The Kill statement provokes Error 70, Permission denied.

Mike,

are you sure you have delete permission for the remote file share
folder?

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 
M

Mike Watson

Emilia Maxim said:
Mike,

are you sure you have delete permission for the remote file share
folder?

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de

Emilia,

Thanks for taking an interest. I've solved the problem. The files I
was trying to delete (the action that provoked the error message) were
in use. Why were they in use? Because in my testing I was trying to
delete files that I had created a few seconds previously using
Automation with a Word.Application object and I had not closed the
object. The Word processes were therefore still active and were
holding onto the files I had created, so not allowing me to delete
them.

I have now obviously corrected my file creation strategy and the
delete process works fine.

Thank you again for your interest.

Mike

Michael Watson
Connecting Software Sas
via Lodovico il Moro 87
20143 Milan
Italy

(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top