Results 1 to 5 of 5
  1. #1
    chrisfl is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Location
    Minnesota
    Posts
    13

    Download all files from attachment field.

    I had the bright idea of creating an Attachment field for each record in my database so that the source material for the record (usually a PDF) could be opened and reviewed easily. A few people have asked me not only for the data but copies of the source files as well - is there a way to export attachments from every field into a directory instead of going one-by-one?



    Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,598
    Review http://blogs.office.com/b/microsoft-...cess-2007.aspx

    EDIT: that link appears to have gone bad, which is unfortunate because the code samples were terrific
    Last edited by June7; 01-24-2014 at 01:22 PM.
    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
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I have a sample DB that implements the code June linked to if you are having troubles.

  4. #4
    chrisfl is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Location
    Minnesota
    Posts
    13
    Quote Originally Posted by ItsMe View Post
    I have a sample DB that implements the code June linked to if you are having troubles.
    That would be awesome. Thanks to you as well, June - I was afraid the answer would be totally over my head.

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    The sample is a little confusing at first blush. I created it to help another member in another thread and it requires interaction that suits their original need.

    The idea is you create a record by:
    • Type some text into a field in the startup form to create a new record
    • Click the file picker and select a file on your computer
    • Click the other control button to attach the selected file to the record you just created


    You can create more records and attach additional files by navigating to a new record and repeating the process.

    Once you have the table populated with attachments you can remove the attachments using the other form, "frmExpAttachment"

    The form is bound to the table (so is the first form) and will display the records you added in single form view. Navigate to the record you desire and remove the attachment using the control buttons provided. There is some code in the click event of "cmdRetrieve", that is commented out, that can delete the attachment if you wish.
    Attached Files Attached Files

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

Similar Threads

  1. Download attachment previously uploaded
    By libraccess in forum Misc
    Replies: 0
    Last Post: 09-12-2013, 02:01 AM
  2. Need to download files to users desktop
    By jax1000rr in forum Programming
    Replies: 6
    Last Post: 02-05-2013, 09:39 PM
  3. Replies: 31
    Last Post: 08-15-2012, 03:33 PM
  4. Replies: 13
    Last Post: 05-23-2012, 12:30 AM
  5. Replies: 0
    Last Post: 08-20-2010, 09:26 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