Access and attachments (1 Viewer)

tmyers

Well-known member
Local time
Today, 01:43
Joined
Sep 8, 2020
Messages
1,090
Just a general question, but what is the general practice when dealing with attachments? I am adding a receiving and shipping table and thought it would be nice to allow attachments for scanned packing slips and such. The first concern that comes to mind is the rapid growth in the size of the app that that would cause (since I believe the max size is 2G). It would be an extremely useful feature if receiving could scan the packing slip and attach it to the job within Access to allow project managers quick and easy access to them utilizing the PDF viewer.

What would be an acceptable practice for this? I am sure allowing them to attach directly within Access would cause a whole host of issues.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:43
Joined
Feb 19, 2002
Messages
43,266
If the packing slips are scanned to a pdf, just store the location of the PDF. Using the FollowHyperlink method you can open any file type that has a type association defined to Windows. This doesn't bloat the database and works great. If you are opening some non-standard file type, you would have to use a different method that let you specify what application to open.
 

tmyers

Well-known member
Local time
Today, 01:43
Joined
Sep 8, 2020
Messages
1,090
If the packing slips are scanned to a pdf, just store the location of the PDF. Using the FollowHyperlink method you can open any file type that has a type association defined to Windows. This doesn't bloat the database and works great.
That was my next line of thought, as I do a similar method elsewhere (to go to job folders that can contains several gigs worth of stuff), but wasn't sure if this would be an acceptable use of the attachment field type.

Are you still able to utilize the PDF view if done in this manner? I have read about the control, but have never messed with it so I am unsure of what all it can do.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:43
Joined
Feb 19, 2002
Messages
43,266
I'm not sure what control you are talking about. FollowHyperlink just opens the document or web page.

I've never used the attachment data type since it is not supported by SQL Server and most of my apps end up with SQL Server BE's.
 

tmyers

Well-known member
Local time
Today, 01:43
Joined
Sep 8, 2020
Messages
1,090
I'm not sure what control you are talking about. FollowHyperlink just opens the document or web page.

I've never used the attachment data type since it is not supported by SQL Server and most of my apps end up with SQL Server BE's.
Got it. Ill just nix that thought and go with the hyperlinking method.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 00:43
Joined
Feb 28, 2001
Messages
27,179
Once you follow that link, you are not in Access until the person closes the child window. If what you activate is a PDF viewer, then it should (in theory) give you the same level of control that you would have had if you click-launched PDF file directly from the desktop.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:43
Joined
Feb 19, 2002
Messages
43,266
Using FollowHyperlink doesn't create a modal window so your Access app is still there and running.. I suppose you can bind the document to an image control but it would be awfully hard to read.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 06:43
Joined
Sep 12, 2006
Messages
15,653
Code:
on error resume next
application.followhyperlink path

you might have to dismiss an irritating warning.
If you want to inform a user of a problem, you will need a real error handler.
 

Users who are viewing this thread

Top Bottom