473,789 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Showing photos in forms or reports

Hi!

I stored the file name and path of photos in a table with data from students
and teachers.
Is there a way to show the photos in a report or form?

Thanks!

Dirk Goossens
Vrij Instituut Sint-Lucas - Oudenaarde
Nov 13 '05 #1
3 2374
Hi,

Just add a normal image object to your form and add to your
form_current method something to the effect of:

Me.image1.pictu re = me.filename

John

Nov 13 '05 #2
"Dirk Goossens" <di*****@skynet .be> wrote
I stored the file name and path of photos in a table with data from students and teachers. Is there a way to show the photos in a report or form?
The sample imaging databases at http://accdevel.tripod.com illustrate three
approaches to handling images in Access, and the download includes an
article discussing considerations in choosing an approach. Two of the
approaches do not use OLE Objects and, thus, avoid the database bloat, and
some other problems, associated with images in OLE Objects.

If you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans' http://www.lebans.com/printfailures.htm.
PrintFailure.zi p is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.
Thanks!


You are welcome.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #3
Place a code on the OnCurrent of the form that will point to the Image
gotten from the
toolbox on the form

Me.Image1.Pictu re = Nz([FileName])

The Nz takes care of the null problem when
the picture path is empty.

I hope this helps

he*****@yahoo.c om

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1742
by: Jeremy Simpson | last post by:
Can someone please help me with this? I am trying to put my jpg photos in my database. Access books seem to avoid the issue of graphics in DB tables and my searches on the internet seem to point me away from putting photos into tables (ultimately on forms). Has anyone successfully put viewable jpg's in their forms? Thanks Jeremy
3
2902
by: RC | last post by:
I can't quite grasp the concept of creating custom reports depending upon what options a user picks on a Form. For example, the user clicks on a "Print Reports" button and a Form pops up. On the Form the user can choose to get a report that shows the Box Numbers that are at Warehouse A, Warehouse B or Warehouse C. and then click on the Print Preview button and get a report showing only the Box Numbers in whichever warehouse was...
1
1634
by: Chris Hartnell | last post by:
I have an Access 2003 database that has a text field which contains a path to a photo. Each new page of the report links to and displays the photo. I use the following code: Private Sub Report_Page() Dim sPath As String On Error GoTo ERR
2
2478
by: misscrf | last post by:
I have a search form that is great. I have modified it in such a way, that when search results come up I can bring it back to a useful spot, say an entry form or a report. Here is my lemon ( hoping someone can help me make lemonade!) I have this form implemented with my Candidate entry form, as a find. click the find button, search, subsearch form shows results, click select on the needed record, and the search form closes, the entry...
7
3271
by: Eric Lindsay | last post by:
I would like to do a photo gallery with a liquid layout. I wanted to center a caption below each photo (or above each photo). I can do that easily with tables, but then I don't have a liquid layout. Besides, I wanted to try to do it with CSS. I can do centered captions with text-align. This works provided the element containing each photo is floated left. I have found several examples of how to do this. However I didn't want the...
0
1870
by: Sridhar | last post by:
Hi, I have a Crystal Report which has two sub reports in it. When I try to view this Crystal Report in my local computer, it is showing data for sub reports also. But when I deploy it to the web server and view the Crystal Report I am not able to view the data of sub reports. It is not giving any error. It is not showing the data. I checked the dlls of Crystal Report. Both the local host and server has same versions. I am not knowing...
2
2285
by: Frankie | last post by:
Using SQL Server 2005 and .NET 2.0; I'm creating a Windows Forms application that will need to display photos of people, along with a bunch of information about each person. In a Web application, there is a generally accepted "best practice" of storing only a string (the path to the .jpg file name), with the actual file stored in an NTFS folder (and not in the database). What's the standard practice for Windows Forms applications? Is...
5
5204
by: Wayne | last post by:
Several of my Access 2003 databases are exhibiting the same problem under Windows Vista. Charts in forms are not showing any data. Reports are not affected. Charts in reports display as they should. The chart object in forms appears but contains no data. It appears to be a screen painting problem because if I open a report or another form on top of the form that is not showing the chart, when the second report or form is closed, the...
1
3607
by: cumupkid | last post by:
II am trying to create a form that will allow me to upload photos to a folder in the site root directory and add the information to the mysql db at the same time. I have created two forms, one that uploads to photo to the folder in the site root diorectory. One that uploads the info to mysql database. but... When I try to upload them both ways at the same time i cant get it. I am Including code for both pages i have working. Code for...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10200
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9984
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5418
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3701
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.