Results 1 to 7 of 7
  1. #1
    FIT is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    3

    Inserting a picture(OLE object) via command button

    Hello folks,



    I'm new in Access and I could use some help. I have a table with an OLE object and some other information. I've created a form for inserting information in that table and I want to add a button to insert pictures from local hard drive.In other word I'm trying to make a button that will open a browse window.

    Thank you in advance.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    This is what I use all of the time for that: http://www.mvps.org/access/api/api0001.htm

  3. #3
    FIT is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    3
    Quote Originally Posted by RuralGuy View Post
    This is what I use all of the time for that: http://www.mvps.org/access/api/api0001.htm
    Every body has been pointing me to this code but i do not understand it!

    Can you simplify it?

    Thx...

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You need to create a new Standard Module and copy all of the code into that module and then compile it. Name the Module basAPI.

  5. #5
    FIT is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    3
    THX

    I can now open a browsing window. But now how do i save the image in the table?

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It is my experience that you will be better off just saving the link and leave the actual picture outside of the db to save the bloat they cause. http://accdevel.tripod.com/imaging.htm

  7. #7
    ZMAN is offline Novice
    Windows XP Access 2003
    Join Date
    Nov 2010
    Posts
    3
    Create a macro. Select the RunCommand option and select Insert Object. in the properties window of the control enter the macro name in the On Click event.

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

Similar Threads

  1. Replies: 11
    Last Post: 10-01-2010, 11:12 PM
  2. Inserting Picture in a report
    By dada in forum Reports
    Replies: 1
    Last Post: 09-17-2010, 01:38 PM
  3. Replies: 1
    Last Post: 07-27-2010, 02:27 PM
  4. Inserting a picture
    By Carenas in forum Forms
    Replies: 0
    Last Post: 01-03-2009, 05:09 PM
  5. Inserting Picture in MS Access Message
    By wasim_sono in forum Programming
    Replies: 0
    Last Post: 01-17-2006, 03:46 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