Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2008

    Unanswered: Display active image outside a subform

    Access 2002,
    DB1 with one to many relation to DB2.
    Form1, fields from DB1 in Detail section, DB2 fields in a table subform.
    One field in DB2 is OLE and has a graphic in it. I do not show this field in the subform table.
    I would like to show the OLE image outside of the subform, next to the info from DB1. Depending on the active record in the subform (DB2), the image of that record would display and would be updated as I browse through the records in the subform.

    This seem like this must be possible. My question is, is this possible within the regular setup and layout of a form, or do I need to get into coding a variable to display the image and update it each time the pointer in DB2 changes.

    How do I go about this?

  2. #2
    Join Date
    Dec 2004
    Madison, WI
    If you're saving the image in a field in the db and want to cycle through images on a popup form to match the record on the main form keep in mind that it will probably be horribly slow as you add more records and cycle through the records on the main form and try to refresh/requery the image popup form. It's best to have a button on the main form to open the popup form with the image (or cycle through the image popup form only with certain fields identifying the record on that popup form.)

    The Northwind db shows though how to do an image field in a table and display it with the other info on the same form.
    Last edited by pkstormy; 04-03-08 at 00:05.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Nov 2007
    Adelaide, South Australia
    You're most likely going to need to code to do this. I'm not sure though as I haven't done such a task. You might be able to reverse link it -- create an invisible one in the subform and link to it from the mainform, but I think you'd have to code to refresh it.

    Personally, I dodge OLE object data fields like the plague as they are really bad for file sizes and cause chronic speed issue and on top of that they tend to make a database unstable and prone to corruption. Better is to store the path to the image file you want to use.
    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

  4. #4
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    thers no reason why you can't bind a control on the parent form to a value on a sub form.

    but I'd stronlgy reccomend that you do within code.. to trap for errors, or to assign a default value. its better in terms of the user interface to display say a blank image 'image not found' than to assign a null vlaue, or have to do some error trapping.

    so I'd look at the form &/or sub form on current event, Id look at the sub forms <myobject> on change event.. and probably a few others.

Posting Permissions

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