Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

content of field length incorrect using formating? 1

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
I seem unable to move the cursor (caret) to the end of the current control when the control has fomatting applied.

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
 
Replace .Value with .Text

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top