473,320 Members | 1,991 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Image Attachment in MS Access

Good day to all,

Is there a way to display an attachment (image file) in a MS Access report in which the field will adjust based on the image size. and also to display this part only if there is an attachment? If I add an attachment field to my report the image will follow the size of the field and when there is no attachment it displays an empty box in the report.
Jul 30 '19 #1
3 1453
twinnyfo
3,653 Expert Mod 2GB
Azrael1015,

Welcome to Bytes!

I am not sure there is a way to do that with an attachment field. But, if you have the image(s) saved to a known location, you can use an image control and link the location of that image to that control. Resizing the control will take accessing the metadata of the file to determine height and width of the image and adjusting appropriately. There is a bit involved with this, but it is not an impossible request. We would need more information before we can provide detailed solutions.

Hope this hepps!
Jul 30 '19 #2
hi twinnyfo,

thanks for your reply. i don't really know much about access. for my report, i just want it to be able to show the attachments. so that when i print it the attachment will also be printed.
Jul 31 '19 #3
twinnyfo
3,653 Expert Mod 2GB
Again, this is done most easily by saving the file to a location known by the Database, and having a field in your table that records the path and file name of that image. Then, using an image control on your report, you link the filename to that control. You may want to take a look at this article on displaying images, which provides several examples and options from other contributors.

This is not so easily done with an attachment field (if at all possible). Like many other developers, I try to avoid using Attachment fields if at all possible. A database stores "data". An attachment field is not "data"--it is a file (or series of files). Access can work with these fields, but not in a way that is altogether intuitive for the beginner (and I personally think the complexity of working with them nullifies their value). These fields can also cause quite a bit of bloat in your DB if you are not careful.
Aug 2 '19 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dale zhang | last post by:
Hi, I am trying to read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp The article author is using PictureBox for windows...
1
by: Eric Keung | last post by:
Hi all, my case is I want to get an image from access database and I just know it's "OLE object" field type at access I also don't know how to insert it into access here is my code and it just...
4
by: | last post by:
Hello, I must admit that i am new to PHP but not in programming in general... Anyway, i created a program in VB which creates after a few steps an image and this image should be sent to an...
2
by: Alec | last post by:
Can anyone help... I need to create a form that allows the user to attach an image, that when posted is emailed to me. Have been looking through the news group and searching for tutorials,...
0
by: Sick Monkey | last post by:
I wrote some code below (Code1 block) which will read a pop3 email account and will open each email in the inbox. What I want my code to do is only pull the attachment; as you see below I...
0
by: dbdb | last post by:
hi, i work with ms. access 2003 i want to display image from a folder to the report. i have read thread in http://bytes.com/topic/access/answers/191611-pictures-access-reports but that's...
1
ilya Kraft
by: ilya Kraft | last post by:
Hello, I need to shape a div tag in the shape like in this image: http://bytes.com/attachments/attachment/5205d1307460155/div.jpg because I want to have a hover event when div with this shape...
0
by: DeboRoy | last post by:
Hello All, Please guide me VBA code to insert the image from access to excel file. Thanks
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.