Not sure why you'd want to go to a new layout when user hits enter or return but here's how you'd do it though...in your current layout, set a layout script trigger under "OnLayoutKeystroke" to trigger a script that would look as follows:
//code 13 is Carriage Return; code 10 is Enter Key
Go To Layout [your_layout]
Thanks for the reply. I guess I need to clarify my need more my bad. Basically I have a Edit Box that is set as "find mode" and when I click in the box and type in my search criteria when I press "return" or "enter" it goes straight to the button and then I have to hit the return or enter button again to have it actually go and find the results on a new layout. I want to be able to bypass that extra step where the focus goes from the edit box to the button and just goes and does the search. Hope that makes more sense. Appreciate it.
that does make a lot of sense, I actually use that a lot where I give my users the option of clicking the button or simply hitting the enter or return key depending on whether they are on a laptop (ENTER key) or a desktop keyboard (this has both ENTER and RETURN keys).
To setup the layout script triggers, go to layout mode, then "Layout setup..." and select the tab "Script Triggers" and activate "OnLayoutKeystroke" and point it to your script.
sounds good thank you very much Breezer!
Part of what you are sking about is controlled by the tab order, and also by field settings controlled from the Inspector panels.
- If you remove buttons from the Tab Order on a layout, the "go to next object" process will skip the buttons.
- If you set a field's options in the Inspector Panel so it does not use the Enter (or Return) keys to go to next object, it will change that behavior as well.