Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embeded Objects OLE

Status
Not open for further replies.

1Braveheart

Programmer
Aug 25, 2002
4
0
0
US
I have an access database where I embeded some jpeg photo files into a table. The database before embeding the photos was 678kb, the photos only totaled 945kb. After I embeded the objects my database is now a whopping 19mb. I was hoping it would be small enough to send as an attachment in an e-mail. Is there away to embed these files without making the db so large? I need to send it to the home office by e-mail with the photos. I cannot link to the files because I need to send the database to another office and to another computer.
 
This is called Access "Bloat" and there is nothing currently that can be done about it.

You can Link to you images on any PC in any Directory so long as the Images are Located in the same Directory as the DB.

Create a Text Field in your Table. In the Text Field put the Name only of your Images, Image1.jpeg, Image2.jpeg etc.

On your form replace your OLE Control with an Image Control, in the Example Code I called this imgPhoto. Again, on your Form create a Hidden Text Box Bound to the Text Field in your Table, in the Example Code I have called this txtPhoto.

In your Form's Declarations section paste the following:

Dim strAccessPath As String

In your Form's Load event paste the following:

strAccessPath = Application.CurrentProject.Path

In your Form's Current event paste the following:

Me!imgPhoto.Picture = strAccessPath & "\" & Me!txtPhoto


As I said, so long as your Images are in the same Directory as the DB, this will Display each Image named in your table.


 
Thanks so much for the help. Any suggestions how I could e-mail an Access db with the linked files so they can all be in the same directory/folder on the recieving end of the e-mail? Does Access zip and unzip nicely? I think I can make this work.
 
Winzip should do the job nicely, also, you could add a text file to the zip file or a covering note explaining to the recipients how and where to extract the zip file to.

Good Luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top