>>>
>>>You don't say what method/event this is in. It should be in the ValidEvent.
>>
>>you're right, I didn't . It is.
>>
>>however,
>>further to my last, I should have also pointed out that the textbox is subclassed with these validation routines. (Because I have at least three different forms which require the same data and validation).
>>
>>If I DON'T use the class, but just cut and paste the code into an ordinary textbox, everything works as expected.
>>
>>Thinking that it might be down to my not having specifically included the classlib, I added a line to do that - no effect. (Didn't really think it was that because it was, after all, running the code, so the class must have been visible to the app).
>>
>>In other words the code is only failing when run from the subclassed textbox rather than a normal one with the same code in it.
>>
>>Does this give us a further clue?
>>
>>Harry
>
>So, the code is in the class. What do you put in the valid event in the instance on the form? Make sure there is absolutely nothing in the instance, not even white space. If that doesn't work, put a DODEFAULT() in the instance on the form.
Actually, a DODEFAULT would cause it to always pass. You would need to
IF !DODEFAULT()
RETURN .F.
ENDIF
Erik Moore
Clientelligence