>My main form which is a top-level form has A toolbar that is opened as in top-level form. What is a way to close main form from a click on a toolbar button?
>
>Thanks, Mark
Forget variables, etc. You can only have 1 top-level form in your app so use the following code to get an object reference to your TLF:
LOCAL loForm, loRetObj
loRetObj = NULL
FOR EACH loForm IN _SCREEN.FORMS
IF loForm.SHOWWINDOW = 2
loRetObj = loForm
EXIT
ENDIF
ENDFOR
RETURN loRetObj
Mark McCasland
Midlothian, TX USA