>Greetings Marcia
>
>>
>>This is all untested and written off the top of my head, so you will need to tweak it. But you get the general idea...
>>
>
>Indeed, and its even simpler than your code because I don't intend to let users edit in grids (or if they do the validation will be part of the grid code)
>
>so all I needed was the syntax for the "_Screen.ActiveForm.ActiveControl"
>
>Does this work if the active control is on a page on a pageframe on a form? If so, then thats exactly what I'm looking for
What's wrong with this? I mean, with This.property? The active object should be a grown up entity, capable of taking care of itself.
There's a couple of gotchas with "_Screen.ActiveForm.ActiveControl" - first, it may be nonexistent at times (like when some object has lost focus, and another object's When is executing - so the other object's .GotFocus is still pending, and may yet not execute at all, if the .When returns .f.). Second, the "_Screen.ActiveForm.ActiveControl" may be a container of any kind - grid, pageframe, container, button group, or other, so you would have to drill down to find which member of the container's controls is the active object.
You were warned :).