Jun 21 2022 07:40 AM
There appears to be a bug in Access 2019 - where setting SelStart=0 and then SelLength=0 in a GotFocus event in a Textbox causes the first character in the textbox to be selected. One would expect the cursor to be set to the beginning of the text in the Textbox with NO selection (instead of one char selected).
Tested on a completely New database with just two textboxes on a Form.
Private Sub Form_Load()
txtTest1 = "Some text"
txtTest2 = "Other text"
End Sub
Private Sub txtTest1_GotFocus()
txtTest1.SelStart = 0
txtTest1.SelLength = 0
End Sub
Microsoft® Access® 2019 MSO (Version 2205 Build 16.0.15225.20028) 32-bit
Jun 21 2022 08:38 AM
SolutionJun 21 2022 08:38 AM
Solution