Solved

Access file with attachment data types

Posted on 2013-01-08
5
248 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
  • 2
  • 2
5 Comments
 
LVL 119

Assisted Solution

by:Rey Obrero
Rey Obrero 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now