Displaying Photos

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to display photos in a form used to print id badges. I tried using a bound object frame and inserting phot in an ole object field. The only thing that displays is an icon to launch the app to edit the picture. I would like the picture of each person to display in their form record. Any suggestions would be appreciated

Thanks, Russ
 
I built an ID card database about 8 years ago.
It worked well.
=============================================================
If you are interested in storing the picture in the database check out
Stephen Lebans' web site:
http://www.lebans.com/loadsavejpeg.htm

The approved solution is to store the path and display the picture
dynamically.
How to Link a Picture to a Form:

Use an unbound image frame named: ImageFrame
and add a field to your table called ImagePath.

To add the picture to a report just use code like this in the On Format
event of the Detail Section.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me![ImageFrame].Picture = Me![ImagePath]
End Sub

In the OnCurrent event of the 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"
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

The image takes a second or two to load. A dialog is put on screen too.
This process can get very annoying after a while because it happens every
time the user navigates to another record.

From Tony Toews' web site: http://www.granite.ab.ca/access/imagehandling.htm
Getting tired of seeing that Loading Image dialogue flicker? Getting errors
by users who click on things before this is finished displaying? Try
creating/changing the following registry key
HKEY_LOCAL_MACHINE\Software\Microsoft\Shared
Tools\GraphicsFilters\Import\JPEG\Options
ShowProgressDialog to No

I use the Tab control to "hide" the image on a different "page".
I also move the code to the OnGotFocus event of the ImagePath text box
which is on the next page of the Tab control.
This way, the only time the picture loads is when the user clicks the tab to
see it.

--
Joe Fallon
Access MVP



Russ M said:
I would like to display photos in a form used to print id badges. I tried
using a bound object frame and inserting phot in an ole object field. The
only thing that displays is an icon to launch the app to edit the picture. I
would like the picture of each person to display in their form record. Any
suggestions would be appreciated.
 
Hi Joe,
I have the same problem. I tried the Registry solution you've forwarded
here, but it didn't work. The message still flashes and causes
inconvenience. Is it just a matter of changing that key in the registry to
No?
Brendan.


Joe Fallon said:
I built an ID card database about 8 years ago.
It worked well.
=============================================================
If you are interested in storing the picture in the database check out
Stephen Lebans' web site:
http://www.lebans.com/loadsavejpeg.htm

The approved solution is to store the path and display the picture
dynamically.
How to Link a Picture to a Form:

Use an unbound image frame named: ImageFrame
and add a field to your table called ImagePath.

To add the picture to a report just use code like this in the On Format
event of the Detail Section.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me![ImageFrame].Picture = Me![ImagePath]
End Sub

In the OnCurrent event of the 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"
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

The image takes a second or two to load. A dialog is put on screen too.
This process can get very annoying after a while because it happens every
time the user navigates to another record.

From Tony Toews' web site: http://www.granite.ab.ca/access/imagehandling.htm
Getting tired of seeing that Loading Image dialogue flicker? Getting errors
by users who click on things before this is finished displaying? Try
creating/changing the following registry key
HKEY_LOCAL_MACHINE\Software\Microsoft\Shared
Tools\GraphicsFilters\Import\JPEG\Options
ShowProgressDialog to No

I use the Tab control to "hide" the image on a different "page".
I also move the code to the OnGotFocus event of the ImagePath text box
which is on the next page of the Tab control.
This way, the only time the picture loads is when the user clicks the tab to
see it.

--
Joe Fallon
Access MVP



Russ M said:
I would like to display photos in a form used to print id badges. I
tried
using a bound object frame and inserting phot in an ole object field. The
only thing that displays is an icon to launch the app to edit the picture. I
would like the picture of each person to display in their form record. Any
suggestions would be appreciated.
Thanks, Russ
 
That is correct.
--
Joe Fallon
Access MVP



Brendan said:
Hi Joe,
I have the same problem. I tried the Registry solution you've forwarded
here, but it didn't work. The message still flashes and causes
inconvenience. Is it just a matter of changing that key in the registry to
No?
Brendan.


Joe Fallon said:
I built an ID card database about 8 years ago.
It worked well.
=============================================================
If you are interested in storing the picture in the database check out
Stephen Lebans' web site:
http://www.lebans.com/loadsavejpeg.htm

The approved solution is to store the path and display the picture
dynamically.
How to Link a Picture to a Form:

Use an unbound image frame named: ImageFrame
and add a field to your table called ImagePath.

To add the picture to a report just use code like this in the On Format
event of the Detail Section.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me![ImageFrame].Picture = Me![ImagePath]
End Sub

In the OnCurrent event of the 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"
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

The image takes a second or two to load. A dialog is put on screen too.
This process can get very annoying after a while because it happens every
time the user navigates to another record.

From Tony Toews' web site: http://www.granite.ab.ca/access/imagehandling.htm
Getting tired of seeing that Loading Image dialogue flicker? Getting errors
by users who click on things before this is finished displaying? Try
creating/changing the following registry key
HKEY_LOCAL_MACHINE\Software\Microsoft\Shared
Tools\GraphicsFilters\Import\JPEG\Options
ShowProgressDialog to No

I use the Tab control to "hide" the image on a different "page".
I also move the code to the OnGotFocus event of the ImagePath text box
which is on the next page of the Tab control.
This way, the only time the picture loads is when the user clicks the
tab
to
see it.

--
Joe Fallon
Access MVP



tried
using a bound object frame and inserting phot in an ole object field. The
only thing that displays is an icon to launch the app to edit the
picture.
I
would like the picture of each person to display in their form record. Any
suggestions would be appreciated.
 
I created a table with an OLE Object field used to link jpg photos to each record (Access 2002). The photos displayed perfectly. Upgraded to 2003, when editing the records (adding or changing the OLE object) the photo no longer displays, now only the description displays. When attempting to edit the Content View section of the Object Packager, the Picture option is dimmed out only the description is available. In the table the OLE field displays "Package" in all uneditted fields the value is "MSPhotoEd.3." Any suggestions?
 
Sorry, no idea.
Post again and hoep that Stephen LeBans sees it!
He is *the* expert with images and Access.
Check his web site:
http://www.lebans.com/
--
Joe Fallon
Access MVP



Richard said:
I created a table with an OLE Object field used to link jpg photos to each
record (Access 2002). The photos displayed perfectly. Upgraded to 2003, when
editing the records (adding or changing the OLE object) the photo no longer
displays, now only the description displays. When attempting to edit the
Content View section of the Object Packager, the Picture option is dimmed
out only the description is available. In the table the OLE field displays
"Package" in all uneditted fields the value is "MSPhotoEd.3." Any
suggestions?
 
Joe I think this was discussed in the private NG. Apparently Office 2003
no longer ships with MS Photo Editor. The relevant KB article is here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;832508&Product=a
cc2003
The solution is reinstall MS Photo Editor from your OFFICE XP disk. I do
not know if you can go back before Office XP and have that version of
Photo Editor work.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
If I had understood the question I would have said:
"You need to install MS Photo Editor or a comparable image viewer."

I was clueless. But not so clueless that I didn't know who had the answer!
 
Back
Top