>Probably bnot a good description but I'm finding it hard to put into words
>what my requirements are.
[quoted text clipped - 6 lines]
>just before the Exit Sub the value of Starting_Point is equal to the length
>of the text (eg 22) yet the cursor remains at position 1.
I have no idea what you are trying to accomplish with all
that code and you didn't explain WHY you feel the need to go
through all that on every keystroke. I would expect the
AfterUpdate event would be the proper place to process the
value.
As for your code moving the cursor, it looks like it's
because you are setting the focus all over the place. There
is no need to do that because you should not be using the
.Text property of any control except the one you are
processing, which already has the focus.

Signature
Marsh
MVP [MS Access]
>I have used the following code:
>
[quoted text clipped - 74 lines]
> End With
>End Sub
Andrew - 02 Oct 2007 06:46 GMT
Hi Marsh,
Firstly thanks for your reply. I've tried many differenct things to do what
I consider to be pretty simple. I'm hoping you can assist me with the basics
and I'll go from there.
In simple terms I have a table (Tbl_Data). Each week data is refreshed in
this table is refreshed. Fields in this table are Code & Description.
Comments are in a table called Tbl_Comments. It contains fields Code,
Comment & Date.
In a form I'm showing Code, Description, Comment and Date (data source is a
query). I have done all of that and now I run into trouble.
I want to allow the user to key into the Comment field on the form and as
they do update the Tbl_Comments.Comments field. (i was kind of able to do
that before but the cursor kept going to the left side of the text meaning
the user had to use the mouse to go to the right).
If that is bad practise I would be happy to do it as an afterupdate event.
I have created a sample of the database and could email it if you are
willing. It is 164KB.
PLEASE HELP as I'm going mad!

Signature
Andrew
> >Probably bnot a good description but I'm finding it hard to put into words
> >what my requirements are.
[quoted text clipped - 96 lines]
> > End With
> >End Sub
Marshall Barton - 02 Oct 2007 17:40 GMT
>Firstly thanks for your reply. I've tried many differenct things to do what
>I consider to be pretty simple. I'm hoping you can assist me with the basics
[quoted text clipped - 12 lines]
>that before but the cursor kept going to the left side of the text meaning
>the user had to use the mouse to go to the right).
It seems to me that you should bind your form to tblData.
Then add a subform bound to the comments table and set the
Link Master/Child properties to the Code field. No code
needed.

Signature
Marsh
MVP [MS Access]
Andrew - 02 Oct 2007 22:37 GMT
Hi Marshall,
I'm try your recomendation but I can't put a sub-form on a continuous form.
Any suggestions?

Signature
Andrew
> >Firstly thanks for your reply. I've tried many differenct things to do what
> >I consider to be pretty simple. I'm hoping you can assist me with the basics
[quoted text clipped - 17 lines]
> Link Master/Child properties to the Code field. No code
> needed.
Marshall Barton - 02 Oct 2007 23:13 GMT
>I'm try your recomendation but I can't put a sub-form on a continuous form.
It doesn't work in all situations, but try adding the
comments table's Primary key field to the record source
query. This is necessary because Access can't figure out
which comments table record to update without the PK to
identify the record.

Signature
Marsh
MVP [MS Access]
Andrew - 02 Oct 2007 23:56 GMT
Hi Marshal,
It doesn't seem to work (defining Primary keys) on the data sheet because it
is possible to have duplicates in some of the fields (including the code
field).
I deleted all of my dupplicate records for the purpose of trying your
suggestion but when I do try to change to continuous I am prompted that I
can't.
I don't think I'm asking Access to do anything complicated. Amy I going
about it the wrong way? I can change my design if required.

Signature
Andrew
> >I'm try your recomendation but I can't put a sub-form on a continuous form.
>
[quoted text clipped - 3 lines]
> which comments table record to update without the PK to
> identify the record.
Marshall Barton - 03 Oct 2007 05:16 GMT
>It doesn't seem to work (defining Primary keys) on the data sheet because it
>is possible to have duplicates in some of the fields (including the code
[quoted text clipped - 6 lines]
>I don't think I'm asking Access to do anything complicated. Amy I going
>about it the wrong way? I can change my design if required.
A primary key field can not be a duplicate. Are you sure
you included it in the form's record source query?
Well, you are asking how to edit two tables in one query.
This is always an iffy affair, so I hate to put many eggs in
that basket.
My usual approach is to use the subform I mentioned earlier,
but, since the form is continuous, put it in the form's
header or footer section, It won't show the comment for
every record, but the comment for the current record will
follow the Code field.

Signature
Marsh
MVP [MS Access]