2007 Attachment Property

A

AccessReportWriter

I posted the following question in the Reports Section on 5/6 but it was
never responded to -- perhaps I did not correctly ask the question.

I write custom reports for an accounting program which is now in the 2007
Format. In order to keep the size of the report database low I create a
Table called Image, and then place various Images in this table which are
then referred to on various reports using a DLookUp. This method has worked
very well; however I normally convert .jpg or .gif images to .bmp images
before storing them in the table. I would like to use the Attachement
Property but am having problems:

My standard DLookUp: =DLookUp("[Image]","[Image]","[Num]=1")

However, if i use the Attachement Property, instead of the image printing on
the report I get the file name such as LogoImage.jpg. Does my DLookUp have
to be altered to pull an Image when using the Attachment Property?

Because I am not in control of Table Design I am unable to relate the Images
Table to any other Tables; I am also unable to to add the Image Table to a
Query because there are no related fields -- this i why I use a DLookUp.
 
F

Fred

A few things are probably making it harder for you to get an answer:

-You didn't say much about what you are trying to do, instead you mostly
talk about your way of trying to do it.

-For Access in general, (I.E. for sure everything prior to 2007) the answer
is to (due to exponential bloat) not put images into tables, instead put
pointers to the images in the table. I hear this may have changed with
2007 but still do it the "pointer" way.

Using the pointer way, there are posts in the year 2007 in Access newsgroups
on how to make images show up in reports and forms. Most likely in the
Access Programming group/forum. I started out with the same problem that you
describe. I learned it then / from those, but don't remember it fluently
enough to repeat it.
 
A

AccessReportWriter

Fred:

Thanks for your response. I have looked at newsgroups and they do not
address the new Attachment Property available in Access 2007. This property
allows you to store an image in a table in its native format and avoid the
"bloat" issues.

I store the image in one table and can then refer to it many times on many
reports using the DLookUp I wrote in my message. This DLookUp works when the
field property of the Image is set to Ole Object; however, when the property
is set to Attachment, on my reports I get the name of the Image File and not
the Image itself. My quesiton is what adjustments do I have to make to my
DLookUp to get the Image on a report instead of the file name itself.

Fred said:
A few things are probably making it harder for you to get an answer:

-You didn't say much about what you are trying to do, instead you mostly
talk about your way of trying to do it.

-For Access in general, (I.E. for sure everything prior to 2007) the answer
is to (due to exponential bloat) not put images into tables, instead put
pointers to the images in the table. I hear this may have changed with
2007 but still do it the "pointer" way.

Using the pointer way, there are posts in the year 2007 in Access newsgroups
on how to make images show up in reports and forms. Most likely in the
Access Programming group/forum. I started out with the same problem that you
describe. I learned it then / from those, but don't remember it fluently
enough to repeat it.



AccessReportWriter said:
I posted the following question in the Reports Section on 5/6 but it was
never responded to -- perhaps I did not correctly ask the question.

I write custom reports for an accounting program which is now in the 2007
Format. In order to keep the size of the report database low I create a
Table called Image, and then place various Images in this table which are
then referred to on various reports using a DLookUp. This method has worked
very well; however I normally convert .jpg or .gif images to .bmp images
before storing them in the table. I would like to use the Attachement
Property but am having problems:

My standard DLookUp: =DLookUp("[Image]","[Image]","[Num]=1")

However, if i use the Attachement Property, instead of the image printing on
the report I get the file name such as LogoImage.jpg. Does my DLookUp have
to be altered to pull an Image when using the Attachment Property?

Because I am not in control of Table Design I am unable to relate the Images
Table to any other Tables; I am also unable to to add the Image Table to a
Query because there are no related fields -- this i why I use a DLookUp.
 

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