Hi
There was a post about this back in 2014 which I tried to make work, but am stuck on one thing.
I have a memo field in the form.
When the user tabs into or clicks into this field the current date and time is placed at the top of the memo field, with all the existing memo field moved down with one additional space under the date line. This is where I want the cursor to be. Code below does most of it, but the cursor will only position at the end of the date line.
Private Sub NoteT_Enter()
Dim DateLength As Integer
DateLength = Len(Format(Now(), " d mmm yyyy hh:nn"))
Me.NoteT = Format(Now(), " d mmm yyyy hh:nn") & vbNewLine & vbNewLine & Me.NoteT
Me.NoteT.SetFocus
Me.NoteT.SelStart = Me.NoteT.SelStart = DateLength & vbNewLine
End Sub
Thanks
Ken.
There was a post about this back in 2014 which I tried to make work, but am stuck on one thing.
I have a memo field in the form.
When the user tabs into or clicks into this field the current date and time is placed at the top of the memo field, with all the existing memo field moved down with one additional space under the date line. This is where I want the cursor to be. Code below does most of it, but the cursor will only position at the end of the date line.
Private Sub NoteT_Enter()
Dim DateLength As Integer
DateLength = Len(Format(Now(), " d mmm yyyy hh:nn"))
Me.NoteT = Format(Now(), " d mmm yyyy hh:nn") & vbNewLine & vbNewLine & Me.NoteT
Me.NoteT.SetFocus
Me.NoteT.SelStart = Me.NoteT.SelStart = DateLength & vbNewLine
End Sub
Thanks
Ken.