473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problem editing memo data in a text field in a Form

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
2 4236
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
I am using Access 2002 with Service Pack 2. I started out with this
(i.e., no previous versions).
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Shyguy | last post by:
I want to create two buttons on a form. One would allow the user to Copy the contents of the current records memo field, the other would allow them to print. I set up a report based on the memo...
2
by: PMB | last post by:
Thank you in advance for any and all assistance. I'm trying to input data from strings to a memo field. I would like to know how to check first to see if there is text there currently and if so...
3
by: BlackFireNova | last post by:
I am working on an Access 2002 Database. I created a new table and imported some notes data into it from an existing table. Now, when I try to create a List Box, and it displays the list of...
4
by: intl04 | last post by:
I have a memo field that is included in some Access reports I created. Is there some way for the memo field to display nicely formatted text, with line breaks between paragraphs? Or is it necessary...
1
by: Steemer | last post by:
Okay, I checked with usual suspects and I'm still frustrated. ..txt file, fixed width. About 88 fields of varying length. All text fields. It will only let me add seperators to about the 410th...
4
by: Mal | last post by:
I have an ACC 2000 database that has a strange behaviour I have a small table, with just a few fields... My report has very simple grouping and sorting, no code bar a NODATA event. I have a...
2
by: David | last post by:
I have a table which is to hold 70 memo fields to contain notes on data changes to corresponding fields in a form. The problem is I dont want to have to create 70 forms to input notes into. Is it...
1
by: sck10 | last post by:
Hello, I am pulling data from a SQL Server table. One field that is (varchar 4000) is used to show notes. I am using a FormView for showing and editing the data. When the form is in Item...
4
by: Bob Alston | last post by:
My client insists that the printed copy of text entered into a memo field have EXACTLY the same layout as it appears on the screen. I found I had to eliminate the vertical scroll bar. Then I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.