>I want to put below commands into a filed's "VALID EVENT" at Run-Time.
>
>******
>IF LASTKEY() = 27
> RETURN
>ENDIF
>THISFORM.SEARCH_COMP_NO()
>******
>
>Do i need to do something in FORM.INIT ??
Normally you can't writemethod at runtime. For a workaround :
1-In valid event call a dummy() function and at runtime change that function
2-At runtime removeobject field.textbox and addobject subclassed textbox with that code (in form init as a good place)
3-If contained in DBC change field level validation
Cetin