I have two files, one is called Library and the other named Detail. Many Detail records can link to a Library item. Think of Library being a genre of literature and Detail as titles in that genre (Detail can only be in one genre). Each Detail item has a link to a LibraryID.
I have a Library layout by which I can add new titles (with limited information) via a portal on that layout. I also have a Detail layout which can edit each item and provide much more information about an item than that available via inputs on the Detail portal on the Library layout. Those are my two main layouts for entry.
In my Detail layout, I want to be able to add a new Detail record directly (not using the Detail portal on the Library layout) - to do so, I need to first identify a Library for it to be attached to (something akin to the "ParticipantPicker" window in the FM Training Series FTS_Meetings database). To do so, I open a third layout, AddOrSelectLibrary, tied to the Library table, through which I can either 1) select an existing Library for which the new Detail record will be linked to, 2) peruse the existing Library records and underlying Detail items already recorded (to be able to see if a similar record already exists) and chose one of those (a "new" record thus not be created, but an existing Detail item would be edited, say to add to the quantity), or 3) add a new library via this layout. The AddOrSelectLibrary layout opens on top of my Detail window. Once I select any scenario noted, the AddOrSelectLibrary window closes.
In the instance of performing sceanrio 1, through scripting I can successfully pick an existing Library from a portal on the AddOrSelectLibrary layout, close that window and be back at my Detail layout with a new record ready to be further edited and linked to that exisitng Library. In performing scenario 3, I can use the AddOrSelectLibrary layout to add a new Library, close that window and be back at my Detail layout with a new record ready to be further edited and linked to that newly created Library. My problem is scenario 2; in my AddOrSelectLibrary I can choose a Library in the Library portal on that layout and below that see in a separate Detail portal all the existing Detail items already in the database. If I see that the Detail item already exists, I want to be able to select that item, close the AddOrSelectLibrary window and have my Detail layout go to that record. However, when I script that process (goto related record using the Detail layout), for some reason I end up with a second "Detail(2)" layout opening to that existing Detail record; the first Detail layout stays put at the last previous Detail record item. Obviously, I do not want to have two Detail layouts open at the same time. I can't seem to get the focus on an existing Detail item in the already open Detail layout. Any suggestions?