[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 644
  • Last Modified:

How to move the mouse pointer in Access 2007

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
Ehab Salem
Asked:
Ehab Salem
1 Solution
 
MINDSUPERBCommented:
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
 
Ehab SalemAuthor Commented:
And if I need to move the mouse X points left or right?
0
 
MINDSUPERBCommented:
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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
Rey Obrero (Capricorn1)Commented:
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
 
GugroCommented:
Can you give us some insight why you want to move the mouse some points left or right in your Access application ??
0
 
Ehab SalemAuthor Commented:
like a tutorial, mouse moves to a location, then some characters are typed in.
0
 
Jeffrey CoachmanCommented:
<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
 
Ehab SalemAuthor Commented:
I used your way, no need to complicate things.
0

Featured Post

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now