Results 1 to 3 of 3
  1. #1
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085

    Image Load

    I have an access Database frontend connected to a sql server backend I have 2 tables 1 for patients and 1 for documents scanned in for the patients each patient can have multiple documents.

    I have a main form for the patient information and a subform for the documents. The table stores 4 pieces of information

    1. the Primary Key of the image table
    2. the foreign Key to link the image to a patient
    3. the path to the scanned image of the document
    4. the description of the scanned image



    the problem I'm having is getting the images to display in the form.

    the subform is linked to the main form via the foreign key. I have an image control on the subform but I'm not sure how to load the image to the image control since I'm storing a path to the image in SQL Server not the image itself. Any assistance on how to get the file to display would be appreciated.

  2. #2
    trevor40's Avatar
    trevor40 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    407

    I use this to update image on form,

    This uses the image filename to update the image as the records change. It does require the full path and filename to be saved in [employee photo] on the employees table.

    Private Sub Form_Current()
    On Error Resume Next

    t = DLookup("[Employee Photo]", "[Employees]", "[barcode] = " & Me.barcode)

    If IsNull(t) Then
    Forms![employee list fm]![Employee Photo].Picture = ""
    Else

    Forms![employee list fm]![Employee Photo].Picture = t

    End If
    End Sub

    1000 ways to skin a cat, allways looking for another one...
    Use MDB format for sample post. If your issue is fixed, mark the thread solved.
    Click on the star below if this has helped.

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    Hi Ray,

    I looked for examples, but this video covers the basics with Access -(oops I see Trevor has provided an example)

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

Similar Threads

  1. filter load
    By slimjen in forum Forms
    Replies: 11
    Last Post: 08-06-2014, 10:25 AM
  2. Replies: 12
    Last Post: 03-27-2014, 04:49 AM
  3. Northwind - how to load
    By KHill in forum Access
    Replies: 4
    Last Post: 07-10-2012, 07:37 PM
  4. Replies: 2
    Last Post: 10-10-2011, 10:58 AM
  5. Cannot load image in Microsoft Office Document Imaging
    By chrisjohns in forum Programming
    Replies: 1
    Last Post: 04-03-2009, 02:45 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