Results 1 to 6 of 6
  1. #1
    taichi56 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    3

    Linking to thousands of external images

    I saw some great code for linking to external images but cannot seem to get it right. I have a database that will have 23,106 rows of data and I have to link to 23,106 .jpg that are loctated on C:\Photos.



    In the table I made a field called: Photos, Dataset: Text
    Then on the form I put an image box and in the control source I put =C:\Photos\"& [Photos]

    The relationship I made a duplicate of my table and linked ID to Photos. Each card has a unique ID number. But I am not getting nay pictures to link. I uploaded an example of the database.
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    You are using a BoundObjectFrame control. Try using the Image control instead.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    taichi56 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    3
    Ok, I tried using the image control and it wants me to put an image in the frame. When I do it is the image that is used for all 23,106 records. So I did not put a graphic but then nothing comes up. In the control source I put: ="C:\Photos\" & [Photos]

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Need to include the Photos field in the form's RecordSource. I use the Image control for dynamic display of external images. I have never used OLEObject controls.

    Rats, your form is not cooperating. Okay, finally got images to display.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    taichi56 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    3
    Ok, I found how to add the the Photos field in the form's RecordSource. I did not get any images to show that way. But what I did was go to my table and type in the url in the field of "Photos", I put this: C:\Photos\189642.jpg and on the next one I put the id of that one also. I then went to the form and in the control source I picked "Photos" It showed me both of my pictures. But I cannot type in every url with the id number for 23,104 .jpg pics left. I will be there forever. How do I do it automatically? What am I missing? Thank for your help.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    If the record ID number is the same as the name given to the corresponding jpg the Photos field is not needed. Try this expression in the ControlSource:

    = "C:\Photos\" & [ID] & ".jpg"

    Why do you have quote mark preceding values in the name field?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Linking images
    By jer in forum Programming
    Replies: 1
    Last Post: 11-25-2011, 08:14 AM
  2. Linking to images
    By Mclaren in forum Forms
    Replies: 2
    Last Post: 06-07-2011, 12:08 PM
  3. Linking to Images in Access using VBA
    By Obeng in forum Access
    Replies: 1
    Last Post: 10-30-2010, 05:39 PM
  4. Linking Access Table with already imported External Data (Excel)
    By izzarshah in forum Import/Export Data
    Replies: 1
    Last Post: 07-29-2010, 09:40 AM
  5. Error Linking External Table
    By mcgowan.b in forum Import/Export Data
    Replies: 9
    Last Post: 11-24-2009, 07:44 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