Unable to add attachments in linked table (1 Viewer)

RogerCooper

Registered User
Joined
Jul 30, 2014
Messages
166
I have found that I can add attachments in the attachment field only if it is native table of the database, but I can't if it is a linked table. Is this a feature of Access or is there a way of doing it?

I can always have the users work with the database containing the table, but it would be easier if there was a linked table.
 

theDBguy

I’m here to help
Joined
Oct 29, 2018
Messages
7,570
Hi. Without testing it, I am not sure this is correct. How exactly were you attaching the files to the linked table?
 

Micron

AWF VIP
Joined
Oct 20, 2018
Messages
1,717
you are aware that attachments in Access tables can cause you to quickly reach the db size limit? Often the better method is to store the attachment file path in a table and just let the user call it from some user action such as a button click. The file or folder picker is all that's needed to store/retrieve files and store the path.
 

Mark_

Longboard on the internet
Joined
Sep 12, 2017
Messages
2,112
Roger,

I'll second Micron's post. Also allows you to manipulate the attachment with the program it is intended to work with. Means you can have a word document, open it in word, and allow your end users to update if needed.
 

RogerCooper

Registered User
Joined
Jul 30, 2014
Messages
166
you are aware that attachments in Access tables can cause you to quickly reach the db size limit? Often the better method is to store the attachment file path in a table and just let the user call it from some user action such as a button click. The file or folder picker is all that's needed to store/retrieve files and store the path.
The attachments are image files that need to be included printed documents that are sent with shipments. It works, except for the annoyance that you need to edit attachments in the original database.
 

Micron

AWF VIP
Joined
Oct 20, 2018
Messages
1,717
If the documents are Access reports, you still don't need to store the images. As noted, works for someone else as a linked table, but I can only comment with respect to my belief that the practice is to be avoided if at all possible, so I cannot offer a solution. Sorry.
 

RogerCooper

Registered User
Joined
Jul 30, 2014
Messages
166
The documents aren't Access reports, they are image files. They need to be printed automatically, not by a user sitting there and selecting them manually. And how I can trust that files external to my database will be there when needed.
 

The_Doc_Man

Happy Retired Curmudgeon
Joined
Feb 28, 2001
Messages
15,460
And how I can trust that files external to my database will be there when needed.
Roger, let me ask this question in response. Do you have an environment where you cannot trust people to not screw around with files that aren't supposed to be theirs?

The way most of us do this is that we set up a folder for the shared back-end database. Then with the back-end file in place, we create a child folder with an appropriate name. We read the contents of the .Connect string on a back-end-resident table, which gives us the device:/path/name.type sequence, and we can trim out the name.type part, tack on the sub-folder name to the device:/path/ string, and build a proper fully qualified file spec for whatever we are about to put into that folder - like one of your images. When storing that image for the first time, we also store the spec as a string. The difference is that images take dozens of KB but a file spec rarely takes more than 128 bytes unless you have some really abominable file or folder naming conventions.

When we want to display an image associated with a record, we load the spec to the property .Image in the appropriate image control using VBA in the appropriate section of the report that contains the other stuff we needed to see. You don't ever let users see that level of interaction, though. You hide everything behind forms so that nobody gets to "look inside the box" of your app.
 

theDBguy

I’m here to help
Joined
Oct 29, 2018
Messages
7,570
The attachments are image files that need to be included printed documents that are sent with shipments. It works, except for the annoyance that you need to edit attachments in the original database.
Hi Roger. As June already said, this should not be a problem, and I think he's right. You should be able to edit attachments in linked tables.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom