>Hello,
>I have onwritebuffer method which checks for follwing.
>loControl = _screen.activeform.currentcontrol
>If type ('loControl') = 'O'
> loControl.SetFocus()
>endif
>
>problem is in my form. I have form with two pages. one page is entry page and second page is list page. while user enters data on entry page and when he clicked on list page , if data is unsaved i want to issue warning.
>for this in the page 2 activate i am checking first writebuffer and then checking for changed data stuff.
>
>but writebuffer does not give proper results because at that time there is no activecontrol on the form is available. so even if data is changed it shows that data has not changed and allows to see list page. pl. advise how this currentcontrol works and any alternative for onwritebuffer method ?
>thankyou
>john still
Forms don't have a currentcontrol property, columns do. I think that to do what you want to do, you need to use
IF TYPE("_SCREEN.ActiveForm.ActiveControl.Name") = "C"
_SCREEN.ActiveForm.ActiveControl.Setfocus()
ENDIF
Erik Moore
Clientelligence