linked images in access and having troubles printing

M

MLBaseball

I found this message through a google search and am using it to attack
a similar problem. I have the code working and the form works great!

However, it shows the same picture whenever I try to print the forms
into a book. Any thoughts on how I could get this to update when I
print my form?

Thanks,
Marc


*********************************************************************
Help!!!! I have built a database in Access97 and need to import many
graphics.
The graphics I have are JPG's at a size of between 50K and 70K.
When I import picture into the database, it increases in size by about
1.1Meg.
As I have about 1000 pictures to import, this is unacceptable.
I have read the help file and it mentions filters but how to load them?

Is there any way to import the jpg's and keep the size down?
Thanks for any help.
Stuart

Reply Rate this post: Text for clearing space


From: exponent - view profile
Date: Tues, Oct 24 2000 12:00 am
Email: (e-mail address removed)
Groups: microsoft.public.access.externaldata
Not yet ratedRating:
show options
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse | Find messages by this author


The 'bloat' is well documented and is due to Access creating an OLE
wrapper containing a metafile with e bmp 'preview' of your image.
Our DBPix control avoids this problem; a 50k jpeg will take 50k (or
less if you resample or recompress them).
The download from www.ammara.com illustrates this; see the
additional 'batchload' sample for some sample code to batch load many
images.

Help!!!! I have built a database in Access97 and need to import many
graphics.
The graphics I have are JPG's at a size of between 50K and 70K.
When I import picture into the database, it increases in size by about
1.1Meg.
As I have about 1000 pictures to import, this is unacceptable.
I have read the help file and it mentions filters but how to load them?
Is there any way to import the jpg's and keep the size down?
Thanks for any help.
Stuart


Sent via Deja.com http://www.deja.com/
Before you buy.

Reply Rate this post: Text for clearing space


From: Joe Fallon - view profile
Date: Tues, Oct 24 2000 12:00 am
Email: "Joe Fallon" <[email protected]>
Groups: microsoft.public.access.externaldata
Not yet ratedRating:
show options
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse | Find messages by this author


This is the "approved solution".


Use an unbound image frame named: ImageFrame and add a field to your
table
called ImagePath.
In the OnCurrent event (every time you change to a different record) of
your
form use this code:


Private Sub Form_Current()
On Error GoTo Err_Form_Current


If IsNull(Me![ImagePath]) Then
Me![ImageFrame].Picture = "c:\msaccess.jpg" 'any old std jpg
for
when there is no associated picture
Else
Me![ImageFrame].Picture = Me![ImagePath]
End If


Exit_Form_Current:
Exit Sub


Err_Form_Current:
Select Case Err.Number
Case 2220
'ignore the Can't Load Image error
Case Else
MsgBox ("Error # " & Str(Err.Number) & " was generated by " &
Err.Source & Chr(13) & Err.Description)
Resume Exit_Form_Current
End Select


End Sub


BTW, the image takes a second or two to load. This process can get very

annoying after a while.
I used the Tab control to "hide" the image on a different "page".
I also moved the code to the OnGotFocus event of the ImagePath text
box.
This way the only time the picture loads is when the user clicks the
tab to
see it.
--
Joe
Access MVP
Check out Dev Ashish's web site for answers to common questions
http://www.mvps.org/access/



Stuart Deaves <[email protected]> wrote in message
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top