Results 1 to 12 of 12
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Not sure if this can be done (2002)

    Hi,
    I have a user who needs to be able to document wound locations on a body diagram. I've seen software that allows the user to mark an x on a diagram. or place a number on the diagram whereeve there is an issue. They then document on it in a memo field. Is this possible in access and if so, where would I start?

    Thanks,
    Leesha

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Not sure if this can be done (2002)

    You could use the On Mouse Down event of the image control. This event passes the X and Y coordinates of the place where the user clicked on the image. You'd have to write code to inspect these coordinates and translate them to a code representing the body part or location.

    There are third-party hotspot editors, but I don't know of one that works with Access. They are usually geared towards Windows Help files or towards use on a web page.

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Not sure if this can be done (2002)

    Hi Hans!

    Well at least it "may" be possible. I did a search of the third party vendors and you're right they are geared towards help files. I've send offf a few emails to them to see if their software would do what I'm looking for. With that being said, and knowing how bad my coding is, is this something you'd be able to help me with or is this simply WAY outta my league and the purpose of the lounge. I don't want to abuse.
    Thanks!
    Leesha

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Not sure if this can be done (2002)

    I have attached a small demo database that shows a possible approach. Open the form and click in one of the circles. You should see a message box.
    View the code behind the form to see how it's done. I have added comments to the code.

    How did I get the coordinates of the midpoints of the circles?
    The first version of the On Mouse Down code looked like this:

    Private Sub Img_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Debug.Print X, Y
    End Sub

    Each time I clicked on the picture, the X and Y coordinates of the place where I clicked were added to the Immediate window. This allowed me to populate the array arrPoints in the code.
    Attached Files Attached Files

  5. #5
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Not sure if this can be done (2002)

    That is awesome. Is the same type of approach possible If they were to not have the circles, but rather if they were to click on the shoulder a number would appear and for each click a new number in sequence would appear. IE first click = 1, second click = 2, 3rd click = 3 and so on. There would need to be a way to delete the numbers if they clicked by accident. The user then could document based on the numbers on the chart and refer to numbers.

    >>>How did I get the coordinates of the midpoints of the circles?
    The first version of the On Mouse Down code looked like this:

    Private Sub Img_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Debug.Print X, Y
    End Sub

    >>Each time I clicked on the picture, the X and Y coordinates of the place where I clicked were added to the Immediate window. This allowed me to populate the array arrPoints in the code.

    OK, you're loosing me here. I'm going to have to play a bit to be able to "see" this one. This should be interesting!

    Leesha

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Not sure if this can be done (2002)

    Here is another demo. You can click up to 8 places on the picture. If you make a mistake, click the last one to make it disappear.
    Attached Files Attached Files

  7. #7
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Not sure if this can be done (2002)

    OMG Hans!! That is soooooooooooooo awesome and exactly what I'm looking for to get started with this project. Do you mind sharing the code? Talk about a whole new area to learn!

    Thanks!
    Leesha

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Not sure if this can be done (2002)

    There is very little code behind the form:

    Private n As Byte

    Private Sub Img_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If n >= 0 And n < 8 Then
    n = n + 1
    With Me.Controls("lbl" & n)
    .Left = X - .Width / 2
    .Top = Y - .Height / 2
    .Visible = True
    End With
    End If
    End Sub

    Private Function lblClick(m As Byte)
    If m = n Then
    Me.Controls("lbl" & n).Visible = False
    n = n - 1
    End If
    End Function

    The On Mouse Down event procedure for the image control increases the counter and postions the corresponding label where the user clicked, then makes it visible (initially, the eight numbered labels are hidden).
    The lblClick function is called from the On Click event of each of the labels. It checks whether the label was the last one to be made visible, and if so decreases the counter and hides the label.

    Feel free to use and modify it any way you want. You may want to add some extra error checking - for example, the code will crash if the user clicks too near the edges of the picture.

  9. #9
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Not sure if this can be done (2002)

    You make is sound so easy LOL! I hope to get cracking at this over the WE now that I know its feasible. I'm sure to be back with questions!
    Thanks,
    Alicia

  10. #10
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Not sure if this can be done (2002)

    Back again. I haven't started playing with this yet however my mind raced all night with the possibilities. One of which was to have a corresponding memo box appear for each click so the user can enter data on the "issue" associated with the number. As I was thinking of this it dawned on me that the user will need to have access to notes that are created on each patient visit. For example, if they are seeing a patient today for pain in the right knee and they document that on the body on the form, there would need to be some way to save that data to an underlying table so if the user refers back to an old note, when it opens, the body diagram comes up with the numbers that were placed on that day. Is this possible???

    Thanks,
    Leesha

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Not sure if this can be done (2002)

    The attached demo shows how to store the info in a table.
    I used a subform to display the notes.

    Note: for simplicity, there is only one list of "spots" per patient, not a separate list per visit. You need an extra table for that (tblPatients > tblVisits > tblSpots) and an extra subform.
    Attached Files Attached Files

  12. #12
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Not sure if this can be done (2002)

    This is great and will get me started!!! I'm sure to be back.

    Thanks,
    Leesha

Posting Permissions

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