Uidoc problem

Hi,

I am using an update button in a form X.When i click that update button the form should close and return to a view called Y.Form X opens with right frame of Frameset “Z”.I am writing the following code

Call Uidoc.Close

Call Wks.OpenFrameSet(“MainFrameset”)

Call Wks.SetTargetFrame(“RightFrame”)

Call uidb.OpenView(“AMView”)

Call Wks.ViewRefresh

Its giving an error msg “Cannot close the current program”

How can i get handle of this situation??Pls help me…

Regards,

Manoshija Ghosh

Subject: Uidoc problem

The code is inside form X.

Once you close form X, the program is flushed from memory, hence it can no longer continue to execute properly.

You will have to make the close call the very last call of your code, if you intend to place it in the UIdocument you are about to close…

Subject: Uidoc problem

Hi Ghosh

Did you used this oject below ? try this else send me your code.

Set uidoc = workspace.CurrentDocument

Call uidoc.Close(True)