Can not open attachment loaded by other users (1 Viewer)

Gismo

Registered User.
Local time
Today, 15:50
Joined
Jun 12, 2017
Messages
1,298
Hi All,

quick question, i have a DB to which we load attachments saved on the network server. the attachments are linked and not imported into the DB.
all are PDF format.
When I load an attachment, other can not open the link and visa versa.
any idea why and how to rectify? there is about 5000 records linked so it would not be feasible to re-link each and every one.

the message i get is "Unable to open ..."
Capture.JPG
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 06:50
Joined
Oct 29, 2018
Messages
21,358
Hi. Not sure I understand. Are we talking about an Attachment field? Or, is it a text field? If text, can you post the code used to open it?
 

Gismo

Registered User.
Local time
Today, 15:50
Joined
Jun 12, 2017
Messages
1,298
this is an attachment field
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 08:50
Joined
Feb 28, 2001
Messages
27,003
The folder where you put the external files needs to have its permissions checked. The folder should have an inheritance setting something like "Allow Read" to the folder and all folders and files therein. There IS a different "permission inheritance" setting that would allow reading only all child folders without referencing the files.

If the only thing you want to do is read or copy the files (which I suspect is true since they are PDFs), you don't need to set individual permissions. Your EFFECTIVE permissions include both per-file and per-folder permissions including inherited permissions. If you are having trouble with implementing this, you can show this comment to the sys admin, who should be able to diddle the permissions correctly.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:50
Joined
Oct 29, 2018
Messages
21,358
this is an attachment field
So, if it's an attachment field, then the files should be embedded in Access. However, you also said the following, so it was a little confusing.
...the attachments are linked and not imported into the DB.
 

Mark_

Longboard on the internet
Local time
Today, 06:50
Joined
Sep 12, 2017
Messages
2,111
From your error message you are holding the path to the attachment, not using an Attachment field, as others have noted.

I'd check to see if there is a drive letter in there. If so, you may have an issue where individuals have different drive mappings. Likewise if someone is saving files on their local hard drive this can be a big issue.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 08:50
Joined
Feb 28, 2001
Messages
27,003
Ah, I read it the other way... but if you don't put the attachments in the same place as the back-end file (or a child folder thereof), then you have a REALLY serious permissions problem - an over-distributed file repository.

Clarify where (physically) the attachment files are being kept because it will make a HUGE difference. An almost insurmountable one if Mark_'s question is relevant.
 

Gismo

Registered User.
Local time
Today, 15:50
Joined
Jun 12, 2017
Messages
1,298
Hi All,

Thank you for all the replies.
Sorry for the confusion, I am using a hyperlink data type field.
The DB is in the same folder on the network, all has the same access granted to the folder.
Also the drive mapping are the same on all pc's.
Not sure what else I could add to make this easier for you.
 

isladogs

MVP / VIP
Local time
Today, 13:50
Joined
Jan 14, 2017
Messages
18,186
If you are just storing the paths to the external files, you would be better using a text field. Hyperlink datatypes can be problematic.

As the files are all PDF, users just need to view the files.
So you could modify the code so a local copy of each file is created for viewing and destroyed after use.
 

Gismo

Registered User.
Local time
Today, 15:50
Joined
Jun 12, 2017
Messages
1,298
The user must ba able to open the PDF when he has selected the related record.
Not sure a text field would work, would it?
will I still be able to link the PDF file if field is a text field?
 

isladogs

MVP / VIP
Local time
Today, 13:50
Joined
Jan 14, 2017
Messages
18,186
Hi
Yes it works perfectly with a text field.
The simplest way to code it is
Code:
Private Sub Filepath_DblClick(Cancel As Integer)
Application.FollowHyperlink Filepath
End Sub

where Filepath is the name of your form control holding the path.
However that won't prevent the issue with network files being locked when opened by another user. You'll need to deal with that as I described before
 

Users who are viewing this thread

Top Bottom