Results 1 to 10 of 10
  1. #1
    akapag22 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    20

    Display Images in grid -Edit form


    Hi friends,


    I want to show an edit form where in I would like to display images that are stored in a directory.
    The info related to the images are stored in t_CustomerFiles.


    Record ID, CustomerID, DestinationPath,EventFileName,
    1, A, C:\Users\Test\Desktop\Images, CustA1.jpg
    2, A, C:\Users\Test\Desktop\Images, CustA2.jpg
    3, B, C:\Users\Test\Desktop\Images, CustB1.jpg
    4, C, C:\Users\Test\Desktop\Images, CustC1.jpg
    5, C, C:\Users\Test\Desktop\Images, CustC2.jpg.


    I would like to show them on a form like a grid and give them option to edit.

    Thank you

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    You want to edit what - the image, that requires opening the image in other software.
    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
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,841
    to display in grid layout you will need an unbound form with the number of image controls positioned as required in a grid layout

    then to populate the image controls you will need some vba code to open a recordset with the required images and loop through it populating the picture property of each image control - and perhaps hiding any controls not populated.

    to edit the image, as June7 says, you will need the appropriate editing software which can be opened on the click or perhaps double click event of each image control

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Unless you want backwards compatibility to Access 2003, I would use the Image control ControlSource property instead of Picture property.
    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
    akapag22 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    20
    By Editing I did not mean editing the Image. Sorry my bad if i was not clear.
    Just edit the record or delete the image or update with new image for the record.

    Thank You

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    You are saving the path string and image name in text fields. Edit by typing the revised values or use FileDialog method to navigate to folder or file location and pull vaues from the dialog.
    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.

  7. #7
    akapag22 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    20
    Hi June, Thanks for the responses. But Now I have a new dilemma. What if I want to show other file types like .txt or .xls files in the grid.
    No need to edit. Just want to show them details of the grid with images icon or other file icons which when clicked would down load the respective file.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    I think would need to associate an image file with each record. Extract the file extension from the stored name with an expression in query or table Calculated field - Right([fieldname], InStr([fieldname], ".")-1).

    Options for displaying images:

    1. Table of images with images in Attachment type field and a field with file extension (txt, xls, pdf) as PK and that table can then be linked to the file extension field of table/query. Bind Image control to the Attachment field.

    2. Expression in ControlSource property of image control can point to external image file.

    In either case, code in the Image control Click event can open appropriate file.
    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.

  9. #9
    akapag22 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    20
    Thank you June...I tried using your suggestion but does not seem to work on continuous form.. i am using 2010 access. Can you provide a detailed way of doing it..Thank You

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Should work on continuous form. What does "does not seem to work" mean - error message, wrong results, nothing happens?

    I have given details. What is it about the instructions you do not understand? What option did you attempt?

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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. Display URL hyperlink images in form
    By cwillwright in forum Forms
    Replies: 1
    Last Post: 10-11-2012, 08:55 PM
  2. Replies: 14
    Last Post: 12-26-2011, 07:32 PM
  3. Replies: 1
    Last Post: 09-27-2011, 08:55 PM
  4. images won't display
    By merlin777 in forum Access
    Replies: 6
    Last Post: 09-02-2011, 09:02 AM
  5. Replies: 17
    Last Post: 08-26-2009, 11:27 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