How do you close a form"A" after opening another form"B"

hello;i am not able to close a form after opening another form, because if i compose 2nd form and then type @command close it closes 2nd one. and if i close it before compose command it doesnt load giving an error as the 1st form is not in memory.can this be done in any other way without using an agent.please let me know.

thanks;

kaushik.

Subject: how do you close a form"A" after opening another form"B"

HI

Where is the code you use to open and edit the docs?

Subject: how do you close a form"A" after opening another form"B"

Sure, write it in Lotusscript instead. Call notesuiworkspace.composedocument, then call notesuidocument.close.