Hi,
What code do I write when I want to set the focus in a field that’s a memo
and I should automatically go to the last line and enter (because I have
already have data in that memo)
Well... the need to do this strongly suggests that you may be misusing the
memo field.
If you're trying to keep multiple more-or-less independent notes with
reference to a record, you may want to consider a one-to-many relationship to
a Notes table. This could have a datefield with a default value of Now() to
timestamp each note, and perhaps a text field to capture the user ID or name
of the person entering the note; you'ld use a Subform to enter the notes.
That said... in the memo field's textbox control on the form, you can edit the
control's Got Focus event to something like
Private Sub textboxname_GotFocus()
Me!textboxname = Me!textboxname & vbCrLf
Me!textboxname.SelStart = Len(Me!textboxname)
End Sub
to insert a newline (CR - LF pair) and put the insertion point at the end.
John W. Vinson [MVP]