Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Location
    Melbourne, Australia
    Posts
    53
    Thanks
    2
    Thanked 1 Time in 1 Post

    Coding for OLE Objects (Access 2000/97)

    I need to load a table with an "OLE Object" field from a file, using code, and then later, to restore that field to a file, possibly with a diferent name.

    Microsoft article Q198466 tells me how to do the first part (although I would prefer to load the object directly into the table without having to load it into a control on a form first), and Post #170856 from HansV shows a similar approach. However, I have not been able to find any clues about how to export or save the object to a file.

    Does anyone have any sample code which would allow me to do this, please?

    Thanks.
    Geoffrey.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Coding for OLE Objects (Access 2000/97)

    You shouldn't be using an OLE field in a table at all - as has been remarked many times in this forum, it is a recipe for serious database bloat. Instead, use a text field to store the path and file name of an external file, and use code to display the file in an unbound control, or to open the external file in the appropriate application.

  3. #3
    Star Lounger
    Join Date
    Apr 2001
    Location
    Melbourne, Australia
    Posts
    53
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Coding for OLE Objects (Access 2000/97)

    <P ID="edit" class=small>(Edited by charlotte on 10-Feb-03 16:38. to activate link to MSKB article)</P>Thanks for the warning, Hans. Yes, I know all the issues, but having reviewed the alternatives have decided that this is the best way to do what I want to do. Hence the request about how to do it, rather than how to design the application.

    I found the answer eventually at Microsoft KB article Q210486. As usual, it is a matter of guessing the right search terms <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Geoffrey

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •