Better take a closer look at your layouts. Simply changing layouts will not "reset to the first record". Do you have several layouts that all specify the same exact name in Layout Setup | Show Records From?
If that's the case, you have several layouts based on the same "table occurrence"--one of the boxes used to define relationships in Manage | Database | Relationships. A given table occurrence in a given window will have one found set with a specific current record and a current sort order. All layouts you might switch to in that window that are based on that table occurrence will share the same found set, current record and sort order.
But it's also possible that you are either tripping a script trigger that is changing the current record.
Or perhaps you are looking at what record is current in a portal. Changing layouts will reset the portal's scroll bar back to the original top of the portal position.
I do have a script trigger upon enter that calls up a script that performs a search for "account type".
So if you disable that script tirgger controlled script whenever you want to return to this layout--since there would then be no need for performing this find all over again, you wouldn't see the current record change.
Here's how I disable script triggers.
I set up a global variable, $$TriggersOff and set it to True whenever I need to disable all trigger performed scripts.
I enclose all trigger performed scripts inside an If block like this:
If [ Not $$TriggersOff ]
Put rest of script here
So a script like this:
Set Variable [$$TriggersOff ; value: True ]
Go to Layout
Set Variable [$$TriggersOff ; value: False ]
then allows me to return to the layout without performing an uneeded find all over gain and my current record should stay put.
Genius! That is exactly what I was looking for. I will try that out. Thank you.