How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Richard Your Own Question
Richard
Richard, Software Specialist
Category: Microsoft Office
Satisfied Customers: 36526
Experience:  Over 15 year experience resolving Microsoft Office Issues
32989067
Type Your Microsoft Office Question Here...
Richard is online now
A new question is answered every 9 seconds

Im doing a very basic database in Access 2010. I just need

Resolved Question:

I'm doing a very basic database in Access 2010. I just need one little "extra" feature to do with mouse movement. When the user is on an image object, circling with their mouse, I would like to get a calculation of the distance they moved with their mouse or the number of rotations they made with their mouse. It is really easy to get the X,Y coordinates but nothing is obvious to track the mouse movement (rotation and/distance). Thank you



***Easy to get X,Y coordinates but and store in a variable on mouse click.
***Would like to get the distance the mouse moved while the mouse moved over the image.

Private Sub Image16_Click()
Me!ResultText.Value = Me!Coordinates.Value
End Sub

Private Sub Image16_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me!Coordinates.Value = X & ", " & Y
End Sub
Submitted: 5 years ago.
Category: Microsoft Office
Expert:  Richard replied 5 years ago.

RichieMe :

Hi there and welcome

RichieMe :

is this what you are looking for?

RichieMe :

Let me know please

Customer:

Yes. I'm not sure to include the code in the example but it is what I would like to work in Access 2010. I would like to see the distance value increment as I circle the cursor over the image. When I stop moving, I want to store the resulting value in a variable by clicking on the mouse.

RichieMe :

ok, then that code will work

Customer:

I have to head out right now and I can't test it. Hopefully, I can figure out how to incorporate it. I've never used this site before. Is this ticket still open until I give it a try.

RichieMe :

its always open

RichieMe :

it never closes

RichieMe :

just remember to click Accept please when your happy

Customer:

Perfect. Thanks.

RichieMe :

your welcome

Customer:

Sorry but I actually have no idea how to incorporate this code into Access 2010. I'm actually used to be a programmer (diff environment obviously). Is there a way to put the folder "CursorDistance" into a library which is accessible? I can meander my way through basic database functions but this it out of my territory. Can you tell me how to add this code? and... how I would add it to the macro...per below:

Customer:

Private Sub Image16_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Me!Text17.Value = X & ", " & YEnd Sub

RichieMe :

ok, make a module in Access. Then copy the code in that. You can then just reference the functions anywhere in the database.

Customer:

ok. I can make a module in access but i'm not sure which code to add. there are quite a few files. Cursordistance.csproj, Form1.cs, Form1.Designer.cs, Form1.resx, Program.cs, and then two subdirectories (obj & properties). Sorry just a total beginner around this stuff. I know how to create basic functions in a module but I don't know how to incorporate this code. Thanks!

RichieMe :

ok,then this will require programming on our side as it is most likely too complex for ytou

RichieMe :

I will move this question to the programming category

Richard and 2 other Microsoft Office Specialists are ready to help you

Related Microsoft Office Questions