Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2008
    Posts
    22

    Unanswered: SetValue for an OLEObject in a table - what to use to accomplish this?

    SetValue has a couple of limitations - it can't modify values in a table, and it can't set the value of an object, therefore I cannot use it to do this task.

    What can I use to do this, then? I'd like to have a macro button on a form that when clicked sets an embedded OLEObject (in this case a bitmap) to a default image specified in some separate table.

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    In short, VBA.

    If you give some more details you'll get better advice. For example, what is the name of your OLE object? Is it bound to a field?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Jun 2008
    Posts
    22
    It is embedded in a table which is referenced by my form, and yes there's an imageframe to which it is bound. Its name is "Mouse Diagram".

    Would it be easier to just link it and use VBA to handle the copying and linking of the external files? That would help alleviate the 2gb database size limit problem.

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Yes... Definitely. All you should store in your database is a field that holds the path to the image file.

    BTW, an Image control would be better than an OLE Object. You can just set it's Picture property to the path of an image and it shows the image.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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