Gerard,
Another late one :)
You can't setfocus from valid, when, range* but you can from other events, methods and typically from lostfocus (or click itself). ie:
*Click
this.Tag = 'ProcessNotDoneYet'
do processing
if processedSucessfully
this.Tag = 'ProcessOK'
else
Anothercontrol.setfocus()
*Lostfocus
if this.Tag # 'ProcessOK'
Nodefault && Simulate valid returning .f. or 0
endif
Cetin