>I haven not check this in VFP 6.
>I have a textbox:
>Format=R
>InputMask=!!!!!!!!!!!!!!!!!!!! && 24
>MaxLength=24
>Value=(None)
>
>I placed a click in the box(es) that:
>MESSAGEBOX(transform(len(this.value)))
>
>When I click the box, sometimes it says length is 0, and at others, it says 24. The box is cleared with a null (""). The only way the box will consistently report a length of 24 is when it is cleared with SPACE(24) or a space(1) [or when the first character of the entry is made]. I can live with this, but am hoping that there might be a way assure the empty box reports its specified length without pushing
data into it.
>
>PS: Access to the box is controlled by a when method that requires
earlier boxes to be populated with data.
>
>Any come-backs appreciated!
>Terry
Terry,
You could put ! to format instead of 24 ! in inputmask. Format = "R!"
this.SelLength = 9999
MESSAGEBOX(transform(this.SelLength))
This would count extra formatting chars if exists (ie: 99-999 would count as 6 instead of 5, you might want to check inputmask too).
PS: VFP7 and later doesn't need transform() for messagebox().
Cetin