Selasa, 29 September 2015

Re: [MS_AccessPros] Set controlsource for image object by vba

 



Hi Onno,
 
Access 2003 may have different controls on the toolbar than modern versions, but the control I use is called a Bound Object Frame. I don't have 'Image Control' available, only 'Image' which would not automatically change between records, but would have to be changed by VBA.
 
I have a table including a field of type 'OLE object', into which I have pasted the various images, and the control source Property of the Bound Object Frame on my form is set to the name of this field. However I don't see a way to change the control source in VBA as you want, so my postings have been irrelevant to your problem
 
Regards,
Dave
 
 
 
----- Original Message -----
Sent: Tuesday, September 29, 2015 2:07 PM
Subject: Re: [MS_AccessPros] Set controlsource for image object by vba

 

 

 Hi Dave, 

 

What exactly is this OLE object that you use exactly, what is the source? 
It is not the Image control that is included in the MSaccess toolbox, right?
Does this OLE-object allow changing the controlsource from  a VBA program ? Setting the controlsource from the properties screen is not the problem, doing so from VBA is.

 

Kind regards,

 

Onno 



---In MS_Access_Professionals@yahoogroups.com, <davewillgmale@...> wrote :


In Access 2003, I use an OLE Object, with control source as a table with an OLE Object field holding images, to produce an image changing on a form.
Dave W
 
----- Original Message -----
Sent: Tuesday, September 29, 2015 8:28 AM
Subject: Re: [MS_AccessPros] Set controlsource for image object by vba

 

 

Dear Crystal, I do run  msaccess 2010. I checked the object model for the image control on MSDN and it does not mention a controlsource property. But apparently it CAN be set  from the  form properties. but not by VBA! Maybe it inherits the property form a partent object, and should I refer to that?  Or is it hidden, can I access it in another way?

 

Any help is welcomed. Onno 



---In MS_Access_Professionals@yahoogroups.com, <strive4peace2008@...> wrote :

Hi Onno,

upgrade to Access 2007 or higher -- then you can have a ControlSource for an image.

warm regards,
crystal

~ have an awesome day ~

On 9/28/2015 11:44 AM, onno.knol@... [MS_Access_Professionals] wrote:

Dear pros,


I have an image control on my form, for which i set the controlsource in the form properties. It is set to a field in the database and when you move to another record,the image changes.

 That works fine. Now later i want to change the source. That seems not to be  possible The image object does not have a controlsource property. Is there a workaround for this?


Kind regards, Onno Knol


__._,_.___

Posted by: "Dave Williams" <davewillgmale@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (9)

.

__,_._,___

Tidak ada komentar:

Posting Komentar