Issue Opeing a view for Searching

I have the following code behind a page hotspot:

targetdatabase:=“Msidmast.nsf”;

Server:=@Name([Abbreviate];@Subset(@DbName;1));

dir:=@LeftBack(@Subset(@DbName;-1);“\”);REM {Returns current directory without file name.};

path:=@If(dir=“”;“ISOx6\”;dir+“\”)+targetdatabase;

@SetTargetFrame(“Frame2”);

@PostedCommand([FileOpenDatabase]; Server : path );

@PostedCommand([OpenView]; “All Documents”);

@PostedCommand([ViewCollapseAll]);

@PostedCommand([ViewShowSearchBar];“1”)

The code opens the view in Frame2 of the frameset, showing the search bar just fine. But the code also opens the view in a completely different window as well, and when I try to close this window, Notes blows up on me.

How do I change this code to open the view in Frame2 only?

The view is in a different database from the one I have the above code in.

Is there something I need to change on the view itself? Or the DB properties that the view is in?

Thanks,

Chad