You could use the mouse position. Consider the following sample:
-Place an image on a form and name the image control "imgMyImage"
-Place to text boxes on the form
Name: txtMouseX
Name: txtMouseY
-Add this code to the Mouse Move event of imgMyImage
Private Sub imgMyImage_MouseMove(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
Me.txtMouseX = X
Me.txtMouseY = Y
End Sub
and this code to the On Click event:
Private Sub imgMyImage_Click()
MsgBox "Mouse X: " & Me.txtMouseX & vbCrLf & _
"Mouse Y: " & Me.txtMouseY, _
vbOKCancel + vbInformation, "Your Coordinates"
End Sub
Your room table would need to store its min and max X and Y values. This
would allow you to trap the current X and Y so you could query the room
table for the proper room number.
I expect you could use similar code as above to populate the values in the
room table.