Results 1 to 5 of 5
  1. #1
    jscriptor09 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    60

    save pasted picture to a jpeg file

    Hi

    I have ACCESS 2010 application that, for some reason, had the user paste pictures to a picture box in a db form. A record is crated for each pic.

    So now th db has many picutres as part of the db itself, and the size of the db is gone to 2 GB

    I need to save/salvage the pasted pictures to a folder and then redesign the app so pictures are recognized via a link to location in a folder

    Question:
    - Given a access 2010 form that shows an imbedded pictures
    - How do I access the picture box via vba and save the picture to the folder as jpeg or png.
    - I basicall need the picture object to that I can pass on to folder path for saving

    Please advise as best way to do this. An example would be greatly appreciated

    Thank

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    If the picture is actually in an attachment type field, review https://www.accessforums.net/access/...orm-42994.html
    See post 6 for sample db with code.

    If the image is embedded on the form, I don't know any way to extract. So went to Bing: Access save embedded image to file

    http://stackoverflow.com/questions/7...cess-to-a-file
    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
    jscriptor09 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    60
    Hi

    if I look at the table which the form is based on, in design mode, the pictures field is OLE Object. I assume it is imbedded, right?

    Thank you

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I have never used OLE type at the table layer/level. I guess there may be an advantage to this when deploying over the internet. I will imagine your OLE field uses a source outside of the DB to then embed the object within the DB. Perhaps you should evaluate the method you used to add objects to the OLE field. I have never tried to extract an embedded object other than Attachment fields.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    If the image is in an OLEObject field in table and not just embedded on form, maybe code can extract. I don't know. Like ItsMe, never used OLEObject type field. Maybe the code is similar to extracting from Attachment field.

    Bing: Access vba extract oleobject from table
    http://msgroups.net/microsoft.public...-to-a-fi/18431
    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: 08-15-2013, 08:33 AM
  2. Query not working with Directly pasted Tables
    By GAccess in forum Queries
    Replies: 3
    Last Post: 06-25-2012, 09:29 AM
  3. Replies: 7
    Last Post: 06-18-2012, 11:31 AM
  4. Picture / Vedeo File Attachment
    By rkalapura in forum Forms
    Replies: 3
    Last Post: 06-14-2012, 01:18 PM
  5. could not find file due split pasted file
    By alex_raju in forum Access
    Replies: 1
    Last Post: 07-18-2011, 11:27 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