Solved

Access file with attachment data types

Posted on 2013-01-08
5
284 Views
Last Modified: 2013-01-12
I'm helping someone with an Access database that has attachment data types in a few of the tables.  The issue we have is that the Access file is huge and growing as new attachments are added.

So I'm trying to find a better way to handle these attachments so they are not in the actual Access file at all but can easily be accessed from the Access database.

Thoughts/Suggestions?

--Steve
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 250 total points
ID: 38756716
see the codes from this link

* Add an Attachment to a Record
* Save an Attachment to Disk

http://msdn.microsoft.com/en-us/library/bb258184.aspx
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 250 total points
ID: 38756844
...Then you can use any number of techniques to "Link" to the data rather than store it in the db.

Here is a very basic example:
Access-BasicLinkFormReportImages.mdb
0
 

Author Closing Comment

by:SteveL13
ID: 38770109
Excellent.  Thanks much!
0
 

Author Comment

by:SteveL13
ID: 38770131
Sorry... I just closed this out and realized that we need to be able to deal with pdf attachments also.  Can this be dealt with in the .mdb example provided?  The Acces version is 2007.

--Steve
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 38770492
Yes, but if you *really* have a need to View the pdf on the form, then this gets complicated.
You have to use a webbrowser control instead of an image control.

You also have to modify the code to filter for PDF files.

It might be easier to use my sample just to select and link to the files...
(and forget about viewing them)

You can create functionality to "Open/View" the files on a button, as there is a distinct difference between "Opening" a file and "Viewing" a file.
So you might be able to use code like this:
http://access.mvps.org/access/api/api0018.htm
...Or something simple like this:
Application.FollowHyperlink [YourFullLinkPath]
...All depending on your exact needs...

JeffCoachman
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question