473,804 Members | 3,058 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ole Objects

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
Feb 9 '06 #1
4 2384
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.ThisFormsIma geControl.Pictu reData =
Forms!NameOFthe HiddenForm.Imag eControl.Pictur eData
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.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Brian Graham" <Gr*****@psac-afpc.com> wrote in message
news:Do******** ************@ma gma.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+
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

Feb 9 '06 #2
In the On_Open event trigger of the REPORT I want the logo displayed in, I put the statement

Me.Image5.Pictu reData = Forms!frmNameTa gs.ImgLogo.Pict ureData

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<ForEmail GotoMy.WebSite.-WWWdotlebansdot ...@linvalid.co m> 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.ThisFormsIma geControl.Pictu reData =
Forms!NameOFthe HiddenForm.Imag eControl.Pictur eData
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.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Brian Graham" <Gr*****@psac-afpc.com> wrote in message
news:Do******** ************@ma gma.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+
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



Feb 9 '06 #3
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<Gr*****@ 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.Pictu reData = Forms!frmNameTa gs.ImgLogo.Pict ureData

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<ForEmail GotoMy.WebSite.-WWWdotlebansdot ...@linvalid.co m> 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.ThisFormsIma geControl.Pictu reData =
Forms!NameOFthe HiddenForm.Imag eControl.Pictur eData
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.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Brian Graham" <Gr*****@psac-afpc.com> wrote in message
news:Do******** ************@ma gma.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+
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



Feb 9 '06 #4
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.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Brian Graham" <Gr*****@psac-afpc.com> wrote in message
news:_f******** ************@ma gma.ca...
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<Gr*****@ 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.Pictu reData = Forms!frmNameTa gs.ImgLogo.Pict ureData

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<ForEmail GotoMy.WebSite.-WWWdotlebansdot ...@linvalid.co m>
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.ThisFormsIma geControl.Pictu reData =
Forms!NameOFthe HiddenForm.Imag eControl.Pictur eData
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.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Brian Graham" <Gr*****@psac-afpc.com> wrote in message
news:Do******** ************@ma gma.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+
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



Feb 9 '06 #5

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

Similar topics

2
8255
by: dasod | last post by:
I would like to know if my method to remove list objects is correct in this small test program. It seems to me that there might be a simplier way, but I'm afraid I don't know enough about list iterators and how they are behaving in situations like this. #include <iostream> #include <list> class Test; typedef std::list< Test* > Tlist;
9
1892
by: Aguilar, James | last post by:
Hey guys. A new question: I want to use an STL libarary to hold a bunch of objects I create. Actually, it will hold references to the objects, but that's beside the point, for the most part. Here's the question: I want to be able to change the references (including deleting them). Is there any way to do that besides using pointers rather than references for the STL library? I'd also prefer to avoid using const_cast, if it is indeed...
6
2582
by: Alfonso Morra | last post by:
I have written the following code, to test the concept of storing objects in a vector. I encounter two run time errors: 1). myClass gets destructed when pushed onto the vector 2). Prog throws a "SEGV" when run (presumably - attempt to delete deleted memory. Please take a look and see if you can notice any mistakes I'm making. Basically, I want to store classes of my objects in a vector. I also have three further questions:
3
3036
by: ytrewq | last post by:
Should dynamic ("expando") properties be restricted to native and user-defined objects? Or should host objects - such as references to the browser or a plug-in or to the document and its elements - also allow them? Adding (and removing) object properties dynamically is an acceptable and common practice in JavaScript, and greatly adds to the power and character of the language. Essentially, an object in JavaScript can be considered to...
8
1863
by: Lüpher Cypher | last post by:
Hi, Suppose we have a hierarchical class structure that looks something like this: Object | +-- Main | +-- Object1
161
7898
by: KraftDiner | last post by:
I was under the assumption that everything in python was a refrence... so if I code this: lst = for i in lst: if i==2: i = 4 print lst I though the contents of lst would be modified.. (After reading that
7
8225
by: Jo | last post by:
Hi, How can i differentiate between static and dynamic allocated objects? For example: void SomeFunction1() { CObject *objectp = new CObject; CObject object;
21
2222
by: George Exarchakos | last post by:
Hi everyone, I'd like your help... Can we have a std::list<BASEwhere BASE be the base class of a class hierarchy? I want to add to this list objects that are inherited from BASE class but not necessarily the same... class base { int x;
27
2571
by: SasQ | last post by:
Hello. I wonder if literal constants are objects, or they're only "naked" values not contained in any object? I have read that literal constants may not to be allocated by the compiler. If the Standard is saying that "object is a region of storage", I deduce from that that literal constants aren't objects because they may not be alocated as regions of storage in the memory.
14
6029
by: Jess | last post by:
Hello, I learned that there are five kinds of static objects, namely 1. global objects 2. object defined in namespace scope 3. object declared static instead classes 4. objects declared static inside functions (i.e. local static objects) 5. objects declared at file scope.
0
9569
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,...
1
10302
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
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...
0
9130
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7608
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
6844
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
5636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2975
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.