Results 1 to 3 of 3
  1. #1
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146

    Open image based on two field values


    Depending on the value in each of two fields I want to open a particular image. There will be many different text in Field1 and in Field2 to choose from, with many images to pick for an output.

    Do I create a table that comes up with all the possibilities? When I click on a button the vba would get the values from Field1 and Field2 and somehow know which image to open, which I assume would be a Hyperlink.

    Hopefully that doesn't sound to convoluted.

    Thanks

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,553
    I would. The image path would be in a field.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,422
    Either a table or assign the image control picture property by way of a Select Case block. The table idea makes the task much more flexible IMO.
    and somehow know which image to open
    Could return that path with DLookup using the 2 fields as criteria or open a recordset (more complicated) and assign it to the control property.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 6
    Last Post: 03-22-2018, 12:02 PM
  2. Open Google Map Using Button based on Values from 2 Text Boxes
    By pjordan@drcog.org in forum Programming
    Replies: 3
    Last Post: 06-21-2017, 11:24 AM
  3. Add an image based on field result
    By Juniorz in forum Forms
    Replies: 3
    Last Post: 09-24-2014, 12:00 PM
  4. Replies: 1
    Last Post: 02-19-2014, 11:07 AM
  5. Show/ hide image based on some field value
    By capitala in forum Reports
    Replies: 4
    Last Post: 04-06-2013, 10:56 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