Results 1 to 4 of 4
  1. #1
    wkeeth is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    7

    A control to choose between images shown in a form field?


    Is there a control I can place into a form field that will allow the user to click on it, then select one image out of a number of images (perhaps like a list-box control)? I'm using MS Access 2010. Thanks.

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Are you asking if you can put actual Images into a LostBox control?
    Or are you asking if Image file names can be put in the ListBox?
    If you can clarify a little - I can try running a test here on my 2010 Access test db.

  3. #3
    wkeeth is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    7
    Quote Originally Posted by Robeen View Post
    Are you asking if you can put actual Images into a LostBox control?
    Or are you asking if Image file names can be put in the ListBox?
    If you can clarify a little - I can try running a test here on my 2010 Access test db.
    Hi, Robeen. Thanks for the reply!

    I'm actually trying to see if image file names can be put into a list box, which, when the appropriate file name is selected by the user, the appropriate image will appear in the defined field.

  4. #4
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    First of all - I apologize for calling it a 'LostBox' - - I meant ListBox!!

    Yes - it is possible to use the ListBox entries to pull up the associated image.
    One way that I have done it in the past in a small Employee Database for the HR department in the job I was in at the time was to use the Employee LastName & MiddleInitial & FirstName & ".jpg" as the photograph file name.
    These images were stored in a folder on the company network and HR wanted the image files sorted by last name.

    In the List Box - our HR people wanted to see the names like 'Joe H Smith'.

    When the Name was selected from the List Box, I took the text and switched it around and got SmithHJoe.jpg & added the network path to it to get something like \\ServerName\FolderName\SmithHJoe.jpg
    If you are in control of the image names and how the names are displayed in the List Box - you can make it a lot simpler by having the ListBox display names to match the Image names [Eg: John_J_Smith for the ListBox . . . and John_J_Smith.jpg for the file name . . .].

    I then used that to populate an Image Control using the 'Picture' property that can be found in the Format Tab in the Property Sheet.
    You can start out with something like this in the On Click event of a command button and then put your actual file name and path in:
    Image1.Picture = "C:\NewFolder\ImageName.jpg"

    All the best!!

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

Similar Threads

  1. Code to sort data shown on a split form
    By meissnerb in forum Programming
    Replies: 1
    Last Post: 05-03-2012, 04:34 PM
  2. Filter items shown in Combo Box in sub-form
    By mikeha_99 in forum Access
    Replies: 2
    Last Post: 06-14-2011, 12:54 PM
  3. Edit record in form with original entry shown
    By erknoebe in forum Access
    Replies: 5
    Last Post: 09-29-2010, 02:33 PM
  4. Entire form not shown in form view
    By ksmall1998 in forum Forms
    Replies: 12
    Last Post: 09-22-2009, 06:38 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