By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,209 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,209 IT Pros & Developers. It's quick & easy.

Problem editing memo data in a text field in a Form

P: n/a
Since Access automatically highlights all of the text in a text
control (I use it to hold data from a memo field) when the control is
activated, I've added the following code to put the cursor at the end.

Private Sub txtCapability_GotFocus()

Placed either behind the OnEnter or GotFocus Event of a control
named,
' in this case, txtCapability, on a form ensures that when the control
is
' activated, the cursor will automatically be placed at the END of all
' the text present in the textbox
' The "cursor at the end" code was taken from "Ten Tips for Microsoft
Access Developers"
' by Frank Rice. The code itself was created by Arvin Meyer, Microsoft
Access MVP
' and taken from a posting to the Access newsgroup
(microsoft.public.access.formscoding)

Me!txtCapability.SelStart = Me!txtCapability.SelLength

End Sub

The problem is that when I want to edit the text I can only do it at
the end (where the cursor is). In order to begin editing in the body
of the text I have to first enter a space (at the end of the original
text), then I can move the cursor to the place I want to edit. If I
move the cursor first and start typing, the new text automatically
appears at the end of the original text.

Is there some code that I can add that will automatically put in a
space so that I can immediately move the cursor to the place within
the text that I want to begin editing? Or, better yet, is there a way
to activate a text field with data from a memo field and directly
start editing wherever I place the cursor?

This text control also has a macro assigned to "On Dirty" that
automatically updates the ChangeDate field to the current date (so
that the ChangeDate will always reflect the last time the Capability
field was changed). Could this have anything to do with it?
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
jmr
I just tried this on one of my search screens that starts out
with a prefix as default. If I move the cursor to the start
or hit the home key, then type the number 2, it will appear
at the beginning of the prefix. I am using Access97. I have
had trouble with this function not working on a Terminal
server... What version of access are you using? Have you
checked for patches? Have you tried this before any patches
are installed?
On 23 Oct 2003 17:01:22 -0700, NewBob <bj****@calspace.com> wrote:
Since Access automatically highlights all of the text in a text
control (I use it to hold data from a memo field) when the control is
activated, I've added the following code to put the cursor at the end.

Private Sub txtCapability_GotFocus()

‘ Placed either behind the OnEnter or GotFocus Event of a control
named,
' in this case, txtCapability, on a form ensures that when the control
is
' activated, the cursor will automatically be placed at the END of all
' the text present in the textbox
' The "cursor at the end" code was taken from "Ten Tips for Microsoft
Access Developers"
' by Frank Rice. The code itself was created by Arvin Meyer, Microsoft
Access MVP
' and taken from a posting to the Access newsgroup
(microsoft.public.access.formscoding)

Me!txtCapability.SelStart = Me!txtCapability.SelLength

End Sub

The problem is that when I want to edit the text I can only do it at
the end (where the cursor is). In order to begin editing in the body
of the text I have to first enter a space (at the end of the original
text), then I can move the cursor to the place I want to edit. If I
move the cursor first and start typing, the new text automatically
appears at the end of the original text.

Is there some code that I can add that will automatically put in a
space so that I can immediately move the cursor to the place within
the text that I want to begin editing? Or, better yet, is there a way
to activate a text field with data from a memo field and directly
start editing wherever I place the cursor?

This text control also has a macro assigned to "On Dirty" that
automatically updates the ChangeDate field to the current date (so
that the ChangeDate will always reflect the last time the Capability
field was changed). Could this have anything to do with it?


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 12 '05 #2

P: n/a
I am using Access 2002 with Service Pack 2. I started out with this
(i.e., no previous versions).
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.