Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access file with attachment data types

Posted on 2013-01-08
5
Medium Priority
?
302 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 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 1000 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 1000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Suggested Courses

824 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