There's one complication with When and Valid events. The delegate code will never be triggered if there's no code in the event itself.
>Where is this code that you want to add at runtime located? Use BINDEVENT() to delegate the When (or any) event to the object method where this code is located. If the code is in a memo field, for example, you will need to compile this code into a class at runtime then create an instance of that class so you can use the BINDEVENT to delegate your events.
>
--sb--