Results 1 to 3 of 3
  1. #1
    BudMan is offline Novice
    Windows 11 Office 365
    Join Date
    Nov 2014
    Location
    Stem, NC USA
    Posts
    20

    Question Printing out multiple attachments in one report.

    Microsoft® Access® for Microsoft 365 MSO (Version 2210 Build 16.0.15726.20000) 64-bit



    I asked this question incorrectly before, so I'll try again.

    I have a simple database that that references SCMs (Stormwater Control Measures). I create a table, add the data for the table and then attach four to six images to it as attachments. The attachments are all saved in one field.

    When I attempt to print out the report, only the first image is printed. I want to print out all of the images, preferable two on a page if possible.

    I tried Googling for an answer, but it all seems to involve tons of VBA code, which I do not know. Does Access have a built-in method to accomplish this?

    Thanks!

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    No, it does not. And storing your images in an attachement field will bloat up your database given enough time\files. The best way is to store the path to the images in a related table that references your SCM table primary key as its foreign key and a short text field where you store the full name (of just the file name if the path is constant) for the images. You create a subform based on this, add it to your main data entry form (hopefully you have one) and manage your images in that. Now for the report it is just a matter of ading a subreport bound to the images table.

    Post back if you get stuck or need more help (usually a small db sample would give you the best answers).

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Actually, it does. Attachment field is a type of multi-value field. Would have to build a query that expands the multi-value field so each attachment item is a record.

    https://support.microsoft.com/en-us/...624e1e323a#bm3

    SELECT ID, fieldname.FileData FROM tablename;


    Agree with everything else Vlad said. If database will not grow substantially, embedding images can be tolerable, otherwise beware.
    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.

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

Similar Threads

  1. Replies: 4
    Last Post: 05-31-2017, 07:09 AM
  2. Replies: 9
    Last Post: 08-26-2014, 10:43 AM
  3. Replies: 1
    Last Post: 06-04-2013, 11:58 PM
  4. Replies: 1
    Last Post: 12-17-2012, 08:29 PM
  5. Replies: 4
    Last Post: 11-01-2012, 11:38 PM

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