Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2007
    Posts
    108

    Unanswered: Using "clickable" image in forms?

    Can this be done in Access forms?

    The basic idea is to have image on a form and that image should be clickable in certain parts and clicks should correspond to chosing an item in drop down list.

    Example:

    1. Instead of having drop down list with choices like:
    Europe, Asia, Africa, North America and so on.. filling the desired field you would have an image of world map and by clicking on certain parts you would be effectively chosing the continent in that particular record!

    2. Another example would be having a large image with 12 signs of zodiac represented as images instead of having drop down list containing:
    Capricorn, Sagitarius etc.

    Help is appreciated?

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    One way I can think of would be to break up the image into separate images so you can use the OnClick on a specific image. Perhaps label each image as it is (ie. Asia) in the dropdown box to make the matching easier to what's in the dropdown. Another way might be to test what coordinates are clicked when you click the mouse button.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    signs of the zodiac fine... as paul suggests you can put some code behind each individual discrete image
    behind a map.. I don't think thats possible in plain vanilla access. there may be some way to use a web style map with hot links but im not ware of such a method.

    mind you being an aging db developer from the early 1980's I hate this obsession the industry no seems to have with pretty pictures and image.. whats wrong with a simple list box or two......

    waht I have seen is say a series of linked listboxes
    list box1 contains continents
    listbox2 is populated based on the selection of lisbox1 with countries in that continent
    listbox3 is populated based on the selection of lisbox2 with counties/states in that country
    listbox4 is populated based on the selection of lisbox2 with Cities/Settrlements in that county or state


    <rant>yes the select an image look real purdy, but does it add value to the app, does it tie up additional time and resources does it actually improve the user interface. is it a bit like the obsession that game developers have about inserting full motion video in to games.. which don't actually advancer the game forward, take up time and resources and get ignored after the first 2..3 times you've seen it</rant>

    what happened to all those nice simple command line interfaces when we had a screen with 80 columns & 24 (occasionally 25) lines on a screen

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    The only way I know of creating image maps is through HTML...
    http://w3schools.com/js/js_image_maps.asp
    George
    Home | Blog

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    user32 api has GetCursorPos which you could trip with _mousedown

    ...but i agree with healdem's rant: all of my users have an IQ above room temperature ( &#176;C ) so i don't need pretty pix.

    izy
    currently using SS 2008R2

  6. #6
    Join Date
    Apr 2007
    Posts
    108
    pkstormy thanks, I had the same idea basically catching coordinates and wirting code that reacts to certain coordinates. I was just hoping I wouldn't be doing it for nothing if a better solution is out there.

    healdem I understand your rant but I feel in this particular very-small scale database solution THE IMAGE is exactly would would add SPARK to otherwise dull uniform looking all-text data.

    In this particular example we need to store data about every extracorporeal shock wave lithotripsy treatment (not so fancy as it sounds - it is destruction of urinary stones by means of shock waves).

    So we need to know the location of the urinary stone we were trying to destroy in a particular session (treatment).

    A nurse would be filling the forms!

    So instead of having:
    1. upper right calyx stone
    2. middle right calyx stone
    3. lower right calyx stone
    4. right pyelon stone
    5. upper third of right ureter
    6. middle third or right ureter
    7. lower third of right ureter
    8. bladder
    9. and so on.... for the left side

    ...in one large list with items needing close attention when choosing the right one you would have a nice image of

    URINARY TRACT

    ... and intuitively click on desired position of the stone.

    It would be one picture, it wouldn't burden the database with unneccesary kBs or MBs and it would add nice functionality as well as "vow effect...."

    Thanks anyway for all the replies.

  7. #7
    Join Date
    Apr 2007
    Posts
    108
    Another way might be to test what coordinates are clicked when you click the mouse button.
    Any idea how I actualy do it in MsAccess cause I can't find it?

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    create your image
    break it down into individual cells which map to the areas you want your user to click on

    place some code behind each images on click event which sets the required value

  9. #9
    Join Date
    Apr 2007
    Posts
    108
    Ok thanks I solved the clicking part, basically catches X and Y coordinates and I have predefined rectangular and circular areas that correspond to parts of urinary tract.

    But I have one last graphical thing I would like to implement:

    Instead of moving arrow cursor across that image, can I change cursor to a small gif that would represent urinary stone?

    That would be "wooooov" :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •