Access: Set focus cursor after character in a text box

akika

Registered User.
Local time
Today, 08:14
Joined
Aug 7, 2018
Messages
102
Hi,

I have a text box "txt_name" in access16, with input mask as
"AB "0000a;0

How can i set the cursor to start after AB <Space> for the textbox "txt_name".
 
Access options...client settings. Set behaviour entering field value to End of Field.
However this change will apply to all controls throughout your database.
 
is there a way to do it via vba codes?
instead of changing the access settings.

the text box value going to be like
"AB |1234"

cursor should be at the pipe when to input the values.
 
See if this suits your needs:

Code:
Private Sub txt_Name_Click()
  Me.txt_Name.SelStart = 3
End Sub

Private Sub txt_Name_Enter()
 Me.txt_Name.SelStart = 3
End Sub

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom