K
Keith G Hicks
(A2003)
I know if I tab to a text box the entire text is selected but when I click
into a text box with a mask, the cursor is placed where I put it rather than
selecting the entire text box. this is a problem when masking for currency
for example. My mask is this: 999999.99
If I tab to the text box, I can type a number then a period then a number
and the decimal ends up in the right place and all seems good. But when I
click into the text box with the mouse, things go astray. I think it would
help to select the entire text regardless of whether the user tabs or clicks
into the box. But I can't seem to find out how to select the text. I tried
this:
Private Sub PkgCommAmtRcvd_Enter()
Me.PkgCommAmtRcvd.SelStart = 0
Me.PkgCommAmtRcvd.SelLength = 100
End Sub
But when I click into the box it still just selects 1 character. How can I
force it to always select the entire text?
Thanks,
Keith
I know if I tab to a text box the entire text is selected but when I click
into a text box with a mask, the cursor is placed where I put it rather than
selecting the entire text box. this is a problem when masking for currency
for example. My mask is this: 999999.99
If I tab to the text box, I can type a number then a period then a number
and the decimal ends up in the right place and all seems good. But when I
click into the text box with the mouse, things go astray. I think it would
help to select the entire text regardless of whether the user tabs or clicks
into the box. But I can't seem to find out how to select the text. I tried
this:
Private Sub PkgCommAmtRcvd_Enter()
Me.PkgCommAmtRcvd.SelStart = 0
Me.PkgCommAmtRcvd.SelLength = 100
End Sub
But when I click into the box it still just selects 1 character. How can I
force it to always select the entire text?
Thanks,
Keith