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.
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.
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.
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!!