Results 1 to 6 of 6
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,071

    Image controls fail to display

    I have a report whose pages are populated with image controls arranged in a 5 column by 6 row array of thumbnails. There 5 pages of thumbnails and the controls are set with this code:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Dim ImagePath As String
    '================================================= ===
    ' Fetch the image name and set the image control.
    ' Use the default image if the image name is missing.
    '================================================= ===

    ImagePath = IPImages & "\" & Me.FamilyImageID & ".jpg"

    If Len(Dir(ImagePath)) = 0 Then
    ImagePath = IPImages & "\DefaultPic.jpg"
    End If



    Me.ImageBox.Picture = ImagePath

    End Sub

    Sporadically, and seemingly randomly, some of the controls show up empty. As you can see from the code, the images are stored as jpg images. They vary in size from 250KB to as much as 800KB. The resulting report looks okay when processed on a fast computer with A2010, but sporadically on a slightly slower computer (A2003 I5 with 4GB memory Win 7 Pro). THEN, when the report is exported to a pdf, the processing terminates with an error suggesting that the images be converted to bmp's no matter which machine is used.

    Any ideas as to what might be going on?

    Thanks,
    Bill Stanton

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,618
    Don't know, I have report with jpg image and exports to PDF just fine, but it is an embedded image in the Image control.

    Do you have to design for Access2003? Do you know that Access2007 introduced ControlSource property to the Image control? Don't need code to display images. Unfortunately, photograph images can look odd in PrintPreview in 2007/2010.

    If you want to provide db, I could test with 2007/2010.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,071
    Well, that brings up another issue that I haven't yet pursued. That is the support for Command(). For some reason, that was dropped in 2010 and I bumped my head on that earlier today as I attempted to do just what you're suggesting. Perhaps I'll be able to make some progress with the current issue once I've addressed the Command() problem.

    I'll post back, probably some time tomorrow after I've been able to compile the otherwise 2003 level of the mdb.

    Bill

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,618
    How would my suggestion to use ControlSource property of Image control in 2007/2010 involve Command()?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,071
    Yes, I thought about that later. You were suggesting more-or-less what I was already trying to do with my attempts to recompile the 2003 mdb to A2010 so that I could see if I got into the same difficulties there. And, that's when I bumped my head on the discontinued support of the Command() function in A2010. As soon as I get that issue resolved, I will complete the compile and look at the ControlSource property to see if that helps in clearing up the original problem I'm having with 2003.

    I'll post back when I've resolved the Command() issue and report my findings when using A2010.

    Thanks,
    Bill

  6. #6
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    2,071
    It might be worth noting here that in my experimenting, I reduced the offending multi-page report from and array of 5 x 6 images per page to that of 4 x 5 image controls AND added a simple high iteration loop in the format detail section to "delay" formatting between image rendering. I was successful with that arrangement and was prompted to do so because of what I experience between what was observed on a machine that is faster than on the machine where I'm doing the development. Dumb loops are not the desirable approach, but I know of no built-in VBA function that essentially forces a wait until the image rendering has been completed before proceeding to the control.
    Bill

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

Similar Threads

  1. Controls for OLE Image Access 2010
    By Mnelson in forum Access
    Replies: 1
    Last Post: 07-10-2012, 06:19 PM
  2. Problems with image display, please help
    By lherndon in forum Forms
    Replies: 2
    Last Post: 04-20-2012, 12:42 PM
  3. Display PASS or FAIL using Unbound textbox
    By Shambler2 in forum Reports
    Replies: 7
    Last Post: 06-02-2011, 11:19 AM
  4. Ofiice 2010 64 bit & Tree and Image controls
    By snoopy2003 in forum Programming
    Replies: 0
    Last Post: 05-15-2011, 08:15 AM
  5. Multiple image controls isn't showing
    By Jamy in forum Reports
    Replies: 0
    Last Post: 02-23-2010, 04:55 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