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 / Reports / Printing / January 2006

Tip: Looking for answers? Try searching our database.

How to programatically change the Picture property at runtime

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob - 05 Jan 2006 23:34 GMT
I want to programatically change the Picture property associated with an
Image object on a report at runtime... how and where would you do it ?

Tried On Format...
Me.imageName.Picture ="C:\image1.bmp"

But this does not work.

Thanks !
freakazeud - 06 Jan 2006 00:30 GMT
Hi,
have a look at this nice tutorial:
http://www.databasedev.co.uk/bound_image_report.html
HTH
Good luck
Signature

Oliver
Admin Specialist & Computer Science Major @ UMD - Go Terps - :)

> I want to programatically change the Picture property associated with an
> Image object on a report at runtime... how and where would you do it ?
[quoted text clipped - 5 lines]
>
> Thanks !
Allen Browne - 06 Jan 2006 01:02 GMT
Rob, if you are doing this in a form, you can crash the database by doing
that:
   http://www.mvps.org/access/bugs/bugs0044.htm

Stephen Lebans has posted more info on this if you search the newsgroups for
his posts. Use the archive at groups.google.com.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hi,
> have a look at this nice tutorial:
[quoted text clipped - 9 lines]
>>
>> But this does not work.
Stephen Lebans - 06 Jan 2006 01:20 GMT
Your code will work assuming:
1) The name of the Image control is "imageName"

2) There actually is a valid Bitmap file in your C:\ drive named
"image1.bmp"

Are you sure you are using the standard Image control, not one of the OLE
Frame controls?
What is the error that is being generated?

Finally, move your code to the PRINT event of the relevant section
containing the 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 want to programatically change the Picture property associated with an
>Image object on a report at runtime... how and where would you do it ?
[quoted text clipped - 5 lines]
>
> Thanks !
Rob - 06 Jan 2006 02:38 GMT
Thanks for responding...

Arghh, I had a typo... it works...

But why on PRINT and not on Format ?

> Your code will work assuming:
> 1) The name of the Image control is "imageName"
[quoted text clipped - 18 lines]
>>
>> Thanks !
Stephen Lebans - 06 Jan 2006 03:13 GMT
The Format event can be called multiple times which may result in a lack of
resources/memory issue.

Additionally, you need to turn off the "Loading Image" dialog that appears
as each image is loaded into the control. Use the Registry based mod here:
http://www.mvps.org/access/api/api0038.htm

Signature

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

> Thanks for responding...
>
[quoted text clipped - 24 lines]
>>>
>>> Thanks !
 
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.