Solved

Move cursor to end of text

Posted on 2012-03-18
2
306 Views
Last Modified: 2012-03-18
Hi All

I have a subform in single form mode that has a note field. Because I have enter behavior set to highlight field when I move between records,  the whole of the note fields text is highlighted. This means that if someone accidentally presses a key on the keyboard the whole note field is deleted to allow new data to be entered. I don't want to alter the default enter behavior because it is usefull elswhere and I don't want to set the focus to another field because that will be highlighted and suffer the same problem.

So what I need in the OnCurrent property of the subform is
If "Notes" (The Note Control)  has focus then move cursor to end of field or text.
0
Comment
Question by:DatabaseDek
[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
2 Comments
 
LVL 16

Accepted Solution

by:
kmslogic earned 500 total points
ID: 37734997
On the Enter event of your textbox that contains your notes (which gets fired when you enter the field) do this:


private sub tbMyField_Enter()
     me.tbMyField.SelStart = me.tbMyField.SelLength
end sub

Open in new window

0
 

Author Closing Comment

by:DatabaseDek
ID: 37735036
Brilliant

Thank you

(Where do you learn this stuff?) I spent an hour looking for it!
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Microsoft Access - limit entry to numbers and letters 10 62
GA Ribbon creator 9 64
Export individual report to pdf 2 41
Moving database to a shared server 7 31
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

738 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