Results 1 to 2 of 2
  1. #1
    smithse is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    37

    Angry Access shared images are reproducing themselves

    Hi all,

    This is my first post!

    My Access DB or better still, application appears to replicate the shared images unwantingly.



    In this example, I have a command button which displays an image. I use this button as a "toggle button" to change from "DAY" to "NIGHT". As it does so, I change the image from a 'sun' to a 'moon' respectively.
    I have been using linked images, but thought I might try with an embedded or shared image in Access 2010.

    My code works, which basically changes the .Picture property, and the .PictureType property is set to embedded in design-time (can only be set at design-time).

    I notice now that my Shared image gallery has a number of reproduced images such as Sun_1, Sun_2... Effectively bloating my database.

    Is there any way that I can set the .Picture property of this command button to use a shared image at runtime using VBA?

    Yes, it does seem strange.

    The Access help only provides information on 'Linked' and 'Embedded' images for the PictureType property. There is no mention of the "Shared" property which is available in the property pages at design-time.

    Your thoughts would be appreciated!

    Cheers

  2. #2
    Rod is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Jun 2011
    Location
    Metro Manila, Philippines
    Posts
    679
    I notice no one has responded. Shared images are new in Access 2010 so I shall be of little help; you need a v.2010 expert. I have no idea why the shared image gallery is growing.

    However to answer the other part of your query: yes, you can manipulate the image in two ways through VBA.

    1. As you only have two images - day and night - you could include two embedded image controls and display one or the other using the 'visible' property. Both controls would be the same size and one would be superimposed on the other. This solution, albeit somewhat clunky, is the safest in that your images will never go missing.
    2. Using linked images, simply change the image address (full path). This seemingly more elegant solution has some pitfalls: if you port the database you must remeber to port the images; it is all to easy for the images to be deleted, moved or renamed; some care must be taken (one time only) in making sure the images are compatible with each other so that they display correctly in the same control. (Note there is an Access property that returns the current directory of the database so if you store the images in the database's directory you can use this property to concatenate the image path.)


    OK, if you haven't solved your problem by now and want detailed help then get back to me.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access copy/paste error in Shared mode
    By somm in forum Access
    Replies: 6
    Last Post: 12-16-2010, 08:59 AM
  2. Replies: 0
    Last Post: 07-14-2010, 04:01 PM
  3. Opening Shared Access File
    By JimmyT in forum Access
    Replies: 1
    Last Post: 11-17-2009, 08:19 AM
  4. Replies: 17
    Last Post: 08-26-2009, 11:27 AM
  5. Problems with Access 2003\2007 and shared drive
    By swasielewski in forum Access
    Replies: 3
    Last Post: 07-10-2009, 06:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums