Results 1 to 2 of 2
  1. #1
    sparky23 is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    9

    Question how to show pictures using DAO?

    I need solution as RecordSet to pull Attachment from table and show it in a form.
    I'm trying to use the same procedure that I used to find and grab the integer data from the tblDistance table.
    The table contains two points, distance, and a cell with a attachment.
    I made it work to compare two variables with those two points in order to find the right distance, but I need beside the distance (integer), to show the picture
    attached in the same row.


    Please checks my work and give me suggestions how can I accomplish.


    I'm not a programmer and I know that there is far better way to write my this program than I did.
    Anyway, it works for me, but I'm still stock with the pulling the pictures from this table.


    The main form is SearchPoint.
    When I choose FRA 1, Room CPR, on A side: Rack ODF1, HU 48, Port 1, and on B side: Rack ODF1, HU 48, Port 24,
    it should show me 0.8 meter and a picture NoBridge.png.


    Thanks in advance
    mFinder.zip

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Can't use DAO to pull object from attachment field and display it in Image control unless you want to save image to file folder - https://sourcedaddy.com/ms-access/wo...nt-fields.html.

    Since the form uses unbound controls and code to populate, bind form to tblDistance, bind Image control to the attachment field, use code to apply filter to display record with the correct image.

    Have a textbox set with the appropriate DistanceID because there are multiple records for same distance, unless the image is the same for the distance, then can reference txbResult.

    RecordSource: SELECT * FROM tblDistance WHERE DistanceID = Forms!SearchPoint!txbID;

    Have code refresh the form.
    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. Show Pictures based on shared ID
    By MrDummy in forum Access
    Replies: 11
    Last Post: 12-31-2015, 06:21 AM
  2. Pictures
    By Michael73052 in forum Forms
    Replies: 1
    Last Post: 08-12-2012, 01:08 PM
  3. Replies: 6
    Last Post: 04-23-2012, 10:54 AM
  4. Working with pictures
    By JFo in forum Access
    Replies: 9
    Last Post: 02-28-2012, 11:01 PM
  5. Pictures sizing
    By newtoAccess in forum Access
    Replies: 0
    Last Post: 11-22-2009, 10:10 AM

Tags for this Thread

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