isladogs
MVP / VIP
- Local time
- Today, 07:15
- Joined
- Jan 14, 2017
- Messages
- 18,840
Access doesn't have a proper double click event. It times two single clicks, so it doesn't always work the way you want.
I would agree with that but your alternative code still relies on a double click event to trigger an action which rather defeats the object in my mind.
As mentioned in another thread, my personal preference is to use a small 'GoToEnd' button next to the textbox with code like this instead of the double click event:
Code:
Private Sub cmdEnd_Click()
Me.txtJSON.SetFocus
Me.txtJSON.SelStart = Me.txtJSON.SelLength
'next 2 lines optional but useful
Me.cmdEnd.Enabled=False
Me.cmdStart.Enabled=True
End Sub
I also use another button to return to the start
Code:
Private Sub cmdStart_Click()
Me.txtJSON.SetFocus
Me.txtJSON.SelStart = 1
'next 2 lines optional but useful
Me.cmdStart.Enabled=False
Me.cmdEnd.Enabled=True
End Sub