Page 1 of 1

i press enter on my forms and they close

Posted: Mon Nov 26, 2018 11:09 am
by jsira2003@yahoo.com
I am sure this is a simple problem to resolve. Unfortunately the resolve didn't come to me. How can I resolve this so instead of the form closing it will advance to the next data entry field.

thank you,
John

Re: i press enter on my forms and they close

Posted: Mon Nov 26, 2018 11:59 am
by jvierra
You have to remove the default button which will always click when return is entered.

Re: i press enter on my forms and they close

Posted: Mon Nov 26, 2018 2:44 pm
by Alexander Riedel
https://www.sapien.com/blog/2015/12/23/how-i-learned-to-love-dialogresult/

Re: i press enter on my forms and they close

Posted: Mon Nov 26, 2018 6:16 pm
by jsira2003@yahoo.com
I looked for the dialogresult to set it to none. But it seems this assumes you have a button to click on otherwise you do not have a dialogresult to set. My form just has a red X in the upper right. I want the user to move through the fields and when they are done press the red x to exit. I do not want a return pressed key to exit the app.

I hope I have explained this well.

John

Re: i press enter on my forms and they close

Posted: Mon Nov 26, 2018 6:26 pm
by jvierra
You created a dialog form and deleted the "Ok" button but the form is still terminating. Somewhere in your form you are processing the return key and exiting. Perhaps the OK button is hiding somewhere. Check the controls list to see if it is still on the form but hidden.