Hi everyone.
I wanna say first, I appritiate a lot the fact that I'm able to ask questions here!
I have a form with a textbox that if its value equals to a certain condition, a command button appears next to it. After the command button appears I need the cursor to go back to the last letter of the textbox so that the user could continue typing without interruption.
I use OnChange event for that:
With the aforementioned code however, I get the whole textbox value being selected, so if the user will type anything, the value will be deleted.
Using
or
at the end of that code doesn't do anything.
I wonder if there's anyway to go to the last letter of a textbox value after that textbox value has been SetFocus'ed.
Thanks for your time!!
Michael.
I wanna say first, I appritiate a lot the fact that I'm able to ask questions here!
I have a form with a textbox that if its value equals to a certain condition, a command button appears next to it. After the command button appears I need the cursor to go back to the last letter of the textbox so that the user could continue typing without interruption.
I use OnChange event for that:
Code:
Private Sub CustomerName_Change()
Me.Refresh
If IsNull(DLookup("CustomerId", "tblCustomers", "CustomerName='" & Me.CustomerName & "' And CustomerSirName = '" & Me.CustomerSirName & "'")) Then
Call subResizeFmeCustomer(1)
Me.CustomerName.SetFocus
End If
End Sub
Using
Code:
SendKeys "{END}"
Code:
SendKeys "{LEFT}"
I wonder if there's anyway to go to the last letter of a textbox value after that textbox value has been SetFocus'ed.
Thanks for your time!!
Michael.
Comment