Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / February 2006

Tip: Looking for answers? Try searching our database.

Ole Objects

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian Graham - 09 Feb 2006 15:06 GMT
I'm trying to put a logo on a report. If I embed the image, then every time it changes, I have to modify the report. Not what I want. (Read 150+ reports..)

I don't want a linked image either. It has 2 problems. One is that a change in the drive the app is run from would cause problems. Second is that there is a bug in that if you import a report with a linked image in it, no further changes to the design are possible.

I can always do a table join and return the image with each record, but that isn't really appropriate where you have 100,000 records. I don't in this DB but others I have do..

So, what I am trying to do is have an object on  the report with a logo pulled from a table. I haven't found out how to do this properly yet.

Anyone?
--
Brian
Stephen Lebans - 09 Feb 2006 15:41 GMT
A couple of methods are available:

1) Add a hidden Image control to the form in question. Load your "default
Picture" into this control. Your statement is incorrect that the Image
control cannot contain an Image without a valid/existing path. In design
view, once you select an Image via the control's Picture property, it
remains embedded.
Now whenever you want to display the defaul pic simply do something like:
Me.ThisFormsImageControl.PictureData =
Forms!NameOFtheHiddenForm.ImageControl.PictureData

or

2) Load the default pic into an Image control.
Copy the control's PictureData property to a table containing a Long Binary
field
When you want to display the default pic simply copy the contents of the
field to the PictureData prop of the desired Image control.

Signature

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

> I'm trying to put a logo on a report. If I embed the image, then every
> time it changes, I have to modify the report. Not what I want. (Read 150+
[quoted text clipped - 15 lines]
> --
> Brian
Brian Graham - 09 Feb 2006 16:27 GMT
In the On_Open event trigger of the REPORT I want the logo displayed in, I put the statement

 Me.Image5.PictureData = Forms!frmNameTags.ImgLogo.PictureData

to which I get an error 'Runtime 438 - Object doesn't support this property or method.'
(Image5 is the name of the image in the report, and ImgLog the name of the bound-OLE field on the form.)

This is Access XP, if I didn't mention it before.
--
Brian

>>> Stephen Lebans<ForEmailGotoMy.WebSite.-WWWdotlebansdot...@linvalid.com> February 9, 2006 10:41:12 am >>>
A couple of methods are available:

1) Add a hidden Image control to the form in question. Load your "default
Picture" into this control. Your statement is incorrect that the Image
control cannot contain an Image without a valid/existing path. In design
view, once you select an Image via the control's Picture property, it
remains embedded.
Now whenever you want to display the defaul pic simply do something like:
Me.ThisFormsImageControl.PictureData =
Forms!NameOFtheHiddenForm.ImageControl.PictureData

or

2) Load the default pic into an Image control.
Copy the control's PictureData property to a table containing a Long Binary
field
When you want to display the default pic simply copy the contents of the
field to the PictureData prop of the desired Image control.

Signature

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

> I'm trying to put a logo on a report. If I embed the image, then every
> time it changes, I have to modify the report. Not what I want. (Read 150+
[quoted text clipped - 15 lines]
> --
> Brian
Brian Graham - 09 Feb 2006 16:34 GMT
I tried your option 2. I added an image (not bound OLE) to my form and then used the same statement as below. And it worked.  :-)

Thanks so much!
--
Brian

>>> Brian Graham<GrahamB@psac-afpc.com> February 9, 2006 11:27:12 am >>>
In the On_Open event trigger of the REPORT I want the logo displayed in, I put the statement

 Me.Image5.PictureData = Forms!frmNameTags.ImgLogo.PictureData

to which I get an error 'Runtime 438 - Object doesn't support this property or method.'
(Image5 is the name of the image in the report, and ImgLog the name of the bound-OLE field on the form.)

This is Access XP, if I didn't mention it before.
--
Brian

>>> Stephen Lebans<ForEmailGotoMy.WebSite.-WWWdotlebansdot...@linvalid.com> February 9, 2006 10:41:12 am >>>
A couple of methods are available:

1) Add a hidden Image control to the form in question. Load your "default
Picture" into this control. Your statement is incorrect that the Image
control cannot contain an Image without a valid/existing path. In design
view, once you select an Image via the control's Picture property, it
remains embedded.
Now whenever you want to display the defaul pic simply do something like:
Me.ThisFormsImageControl.PictureData =
Forms!NameOFtheHiddenForm.ImageControl.PictureData

or

2) Load the default pic into an Image control.
Copy the control's PictureData property to a table containing a Long Binary
field
When you want to display the default pic simply copy the contents of the
field to the PictureData prop of the desired Image control.

Signature

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

"Brian Graham" <GrahamB@psac-afpc.com> wrote in message
news:Do-dnbK5r6Lpx3beRVn-og@magma.ca...

> I'm trying to put a logo on a report. If I embed the image, then every
> time it changes, I have to modify the report. Not what I want. (Read 150+
[quoted text clipped - 15 lines]
> --
> Brian
Stephen Lebans - 09 Feb 2006 19:30 GMT
Option one did not work because:

1) I stated the use of the Image control not the Bound or Unbound OLE Frame
control

2) You would have to place the code in the same Section as the relevant
Image control.

I prefer the second method you got to work because it hides the logo from
the end user.
Signature


HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

>I tried your option 2. I added an image (not bound OLE) to my form and then
>used the same statement as below. And it worked.  :-)
[quoted text clipped - 59 lines]
>> --
>> Brian
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.