Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to move the mouse pointer in Access 2007

Posted on 2011-02-22
8
Medium Priority
?
643 Views
Last Modified: 2012-05-11
I need to add a code in an MS Access Form to move the mouse pointer and type some characters.
How do I do that?
0
Comment
Question by:Ehab Salem
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 19

Accepted Solution

by:
MINDSUPERB earned 1500 total points
ID: 34958569
To move a mouse to a specific text box, you may use this code:

Me.txtYourTextBox.SetFocus

If you want your textbox automatically filled in with characters, you may type:

Me.txtYourTextBox="abc"

Sincerely,
Ed
0
 
LVL 14

Author Comment

by:Ehab Salem
ID: 34959855
And if I need to move the mouse X points left or right?
0
 
LVL 19

Expert Comment

by:MINDSUPERB
ID: 34959936
I might be wrong but I think, mouse cursor position in your screen is controlled by the mouse (hardware) through human interaction. You might not found a code for it.

The comment I posted at ID: 34958569 was in understanding that you mean the focus of your cursor on the screen. Please disregard it.

Sincerely,
Ed
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34960461
are you saying you want to move the cursor to a position in the textbox?
this will only be possible if the textbox have some info in it.
if the textbox is null the default position is 0

me.text0.setfocus
me.text0.selstart=4  ' will move the cursor to the fifth position
0
 
LVL 6

Expert Comment

by:Gugro
ID: 34960562
Can you give us some insight why you want to move the mouse some points left or right in your Access application ??
0
 
LVL 14

Author Comment

by:Ehab Salem
ID: 34960655
like a tutorial, mouse moves to a location, then some characters are typed in.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 34965283
<like a tutorial, mouse moves to a location, then some characters are typed in.>

Then use a screen recorder:
http://www.google.com/#hl=en&sugexp=cgsisas&xhr=t&q=screen+recorder&cp=8&pf=p&sclient=psy&aq=0&aqi=&aql=f&oq=screen+r&pbx=1&bav=on.1,or.&fp=5e2b21bd614e0a97

Moving the mouse via code will be problematic as the absolute postion will also be dependent on:
The users screen resolution
The current position of the mouse
The position of the window on the screen
...etc

So in your question is is always useful for you to state why you need to do something (Your ultimate goal), in case there is a more efficient method, or a different approach.

;-)

JeffCoachman
0
 
LVL 14

Author Closing Comment

by:Ehab Salem
ID: 34991576
I used your way, no need to complicate things.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question