Results 1 to 3 of 3
  1. #1
    zx3 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2011
    Posts
    47

    How to use attachment of a table as picture on report

    Hi all,



    Just wondering how to put pics on report using vba, the source is from the attachment of a table.

    Here's my sample db, i want to put the 2nd pic of table1 to the report's unbound image frame when it loads, hope to hear from you soon, thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,795
    If this is possible, might require some complex code, check this thread http://www.pcreview.co.uk/forums/att...-t3988118.html

    The idea behind the attachment field is to store a document (image or other) associated with a record, such as employee photo. Include the image with record on report by dragging the attachment field from the field list to the report. This actually creates a special control to hold the image from attachment field. I can't find this control on the designer and can't change it to another type of control.

    If you want image on a form or report for other purpose, such as a logo in header, use the Image control and browse to the image file to load it. Or have a text field in table that stores file path/name and then refer to that field in the Image control ControlSource property.

    Check out this tutorial about the attachment field with images http://www.access-freak.com/tutorials.html#Tutorial07
    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
    zx3 is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2011
    Posts
    47
    Thanks June7, while waiting for more reply, i did my own research, it is very difficult if not impossible to use code to put use attachment of a table( pics) on unbound, bound or attachment controls.

    Many website they just have similar problem posted but no reply, msdn not helpful at all, i tried looking through the methods, properties of attachment control, none of them allow assignment of pics.

    My conclusion is, unbound, bound or attachment controls work just like each other, don't border to use code to put attachment field pics to the above 3 controls, not gonna success, simply waste of time.

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

Similar Threads

  1. Replies: 1
    Last Post: 08-30-2011, 11:54 PM
  2. Attachment Picture
    By cggriggs in forum Forms
    Replies: 0
    Last Post: 06-14-2011, 10:17 AM
  3. Table with attachment field and report
    By Yaan in forum Access
    Replies: 0
    Last Post: 02-18-2011, 02:12 AM
  4. Table with attachment field and report
    By Yaan in forum Access
    Replies: 1
    Last Post: 02-13-2011, 07:01 AM
  5. Change a Picture in an Attachment
    By ksmith in forum Access
    Replies: 2
    Last Post: 08-18-2010, 11:17 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