Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 11th, 2005, 04:39 AM
Registered User
 
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Bill,
As simple as your code is to follow, I can't get it to work. I keep getting an error:
Code:
Object doesn't support this property or method
I have followed the example as closely as I could. Could you offer any Ideas?

Here's what I have:
1. In the table, a Text field called "picture_name" which holds the path and file name of the .jpg
2. created a report, added a Bound Object Frame called "imgImage" with a control source of "picture_name"
3. added your code to Modules:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If IsNull(Me("picture_name")) Then
  Me![imgImage].Visible = False
Else
  Me![imgImage].Visible = True
  Me![imgImage].Picture = Me![picture_name]
End If

End Sub

Thank you,

John in NYC
 
Old February 11th, 2005, 06:23 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 100
Thanks: 0
Thanked 0 Times in 0 Posts
Default

John,

Your Syntax is probably incorrect. try this

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If IsNull(Me![picture_name]) Then
  Me![imgImage].Visible = False
Else
  Me![imgImage].Visible = True
  Me![imgImage].Picture = Me![picture_name]
End If

End Sub
 
Old February 11th, 2005, 12:59 PM
Registered User
 
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

JpJoe,

Thanks for the guidance, but that did not correct it. I tried a couple different variations, none worked.
But, when I get the error message and click "debug" the highlighted line is:

Me![imgImage].Picture = Me![picture_name]

but that line seems to be correct. ...guess I need more guidance.

John R





Similar Threads
Thread Thread Starter Forum Replies Last Post
Linked Images in Firefox Showing Underline kwilliams CSS Cascading Style Sheets 1 March 27th, 2008 03:01 PM
How load images on report from report path hyder_master Crystal Reports 0 October 5th, 2007 05:17 AM
deleting records in linked tables tico31pl Access 4 May 18th, 2006 04:10 PM
why images are not showing up in my report? yuqlin BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 6 November 29th, 2005 04:15 AM
Dynamically inserting images in the report ashu_from_india Crystal Reports 0 February 22nd, 2005 12:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.