Results 1 to 2 of 2
  1. #1
    MSinDC is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2020

    How to Show the Correct JPG in a Report


    I have a database that tracks an art collection. Each record can have any number of photographs attached to it. I have a report that is supposed to show a large copy of the first photograph and small copies of the next four. But it is actually showing the photographs in what appears to be a random order.

    The control source reads as follows:

    =DFirst("fpath","FilePath_Table") & "" & [lstImage].[itemdata](0)

    (And for the next four images the last numeral is 1, 2, 3, and 4.)
    I don't see anything in the Visual Basic that seems to regulate this. There is a table called "Files" that has a field called FileID with unique numbers and FName that has the name of the image. (For example, FileID 77128 corresponds to FName 00004.01.jpg, FileID 77129 corresponds to FName 00004.02.jpg, etc.)

    Can anyone help me adjust this so that it selects the images in proper order? The records show on the main form in numerical order according to the image file names.



  2. #2
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Kelowna, BC, Canada
    just order the rowsource for the listbox ascending by the image file name.

    Vlad Cucinschi
    MS Access Developer

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

Similar Threads

  1. Average not coming out correct in report
    By chriswrcg in forum Reports
    Replies: 3
    Last Post: 01-31-2019, 03:59 PM
  2. Replies: 5
    Last Post: 06-11-2015, 06:45 PM
  3. Replies: 5
    Last Post: 09-12-2014, 06:41 AM
  4. Replies: 1
    Last Post: 01-11-2013, 06:01 PM
  5. Replies: 9
    Last Post: 06-26-2011, 09:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Tech Forums: Microsoft Office Forums