I seem unable to move the cursor (caret) to the end of the current control when the control has fomatting applied.
I'm using
The content of the field is 253.5 , but it is meant to me a monetary figure, so I change the form field format property and the value correctly displays as 253.50 only the cursor using the code above is moved to between the 5 and the zero.
So the lenght of the field does not include additional chars added by the formatting?
How do you get round this?
Thanks,
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Dance Music Downloads
I'm using
Code:
Me.Controls(Screen.ActiveControl.Name).SelStart = Len(Nz(Me.Controls(Screen.ActiveControl.Name).Value, ""))
The content of the field is 253.5 , but it is meant to me a monetary figure, so I change the form field format property and the value correctly displays as 253.50 only the cursor using the code above is moved to between the 5 and the zero.
So the lenght of the field does not include additional chars added by the formatting?
How do you get round this?
Thanks,
1DMF
"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Dance Music Downloads