how about
Private Sub Notes_Enter()
If Not IsNull(Me.Notes) Then
If Not Right(Me.Notes, 2) = vbCrLf Then
Me.Notes = Me.Notes & vbCrLf
Me.Notes.SelStart = Len(Me.Notes)
End If
End If
End Sub
Private Sub Notes_Click()
DoEvents
Me.Notes.SelStart = Len(Me.Notes)
Me.Notes.SelLength = 0
End Sub
Private Sub Notes_Enter()
If Not IsNull(Me.Notes) Then
If Not Right(Me.Notes, 2) = vbCrLf Then
Me.Notes = Me.Notes & vbCrLf
End If
Me.Notes.SelStart = Len(Me.Notes)
Me.Notes.SelLength = 0
End If
End Sub
OK, We are talking apples and oranges.
The On Enter, is not the event when you hit the enter key. It is the event when you enter into a control from outside the control. My code automatically creates a new line and goes to the new line when you enter into the textbox. By either tabbing into it or clicking in it. The Enter Key Behavior is what happens when you select the enter key.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.