Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2009
    Posts
    3

    Unanswered: associate image to record

    Hi all, I'm sure this question has been asked before but I am new. I have been trying to do this for a while now and am getting no further,
    I am currently using access 2003 to track and record assets for work, the last thing I need to do it create an image box in the form and have the image change for each record.

    does anyone know how to go about doing this? I have attached an image of the front screen of the database, I want the image to go to the right where the blank space is.

    Cheers,
    Attached Thumbnails Attached Thumbnails assets.JPG  

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Store the path to the image in your table as a string and then set the image control to that path OnCurrent in your form.

    You could also use an OLE Object but that has serious disadvantages.
    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
    Nov 2009
    Posts
    3
    Excellent work, thank you muchly! however it has slowed the system down a fair bit, any way to get around this?

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Which approach did you use?

    The first approach shouldn't slow things down too much, but the second sure will.
    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

  5. #5
    Join Date
    Nov 2009
    Posts
    3
    The first one,

  6. #6
    Join Date
    Nov 2009
    Location
    UK
    Posts
    44
    i got a template somewhere that uses the an api to get the file name with a form to display the pic. Runs like a charm, i use it on most of my apps.

    PM me and i will send it over

  7. #7
    Join Date
    Nov 2009
    Location
    UK
    Posts
    44

    Template

    I chopped a DB down to get the form and module for you, the module was originally written by Ken Getz so thanks to him. It doesn't require any active X controls or OLE objects so runs really fast without the bloating problem. The table contains the field for the string and the rest is done with the module and code on the form.

    Enjoy
    Attached Files Attached Files
    Last edited by leebaggaley; 11-04-09 at 22:10.

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    How big are the images? In kilobytes kind of size... not cm or whatever

    The first method, and indeed Ken's should not slow the system down much at all... unless you're using like BMPs and 4MB images!
    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
  •