Sage SalesLogix
  • Contact Us
  • Sage North America
800-643-6400
Welcome Twitter Facebook LinkedIn
Community Home Blogs Share Ideas Search Request Access Resources
Reply
Bronze Elite Contributor
RJSamp
Posts: 481
Registered: 03-24-2009
Accepted Solution

7.X LAN: any way to capture an ESC key and not close the form?

you enter a bad value on a form that fires off a calculation (Price * (1 - discount %) * Quantity = Amount or what have you) on the OnExit of the control.....

If you aren't in the control SLX/Windows closes up the form as a cancel.... any way to capture the ESC key and not close the form down?

RJ Samp
Please use plain text.
Bronze Super Contributor
DanCarvin
Posts: 153
Registered: 04-08-2009

Re: 7.X LAN: any way to capture an ESC key and not close the form?

Unless there's an OnEsc event I don't know about, I don't think so.   If it is a modal form, I would think that Esc would be like a cancel click and the bad value would not be saved.   If you're worried about bad values in an Main View, I'd put validation in the WhenExit event.
Please use plain text.
Silver Contributor
ngaller
Posts: 699
Registered: 04-17-2009

Re: 7.X LAN: any way to capture an ESC key and not close the form?

You can prevent the form from closing in AXFormCloseQuery - this works with Escape too, though tying it with the validation piece may be a bit tricky (I am not sure it will tell you which control has focus)
Please use plain text.
Gold Super Contributor
RJLedger
Posts: 2,234
Registered: 03-19-2009

Re: 7.X LAN: any way to capture an ESC key and not close the form?

I told him that ;-)
--
RJ Ledger - rjledger@rjlSystems.net

".. Stay Focused..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Please use plain text.
Bronze Elite Contributor
RJSamp
Posts: 481
Registered: 03-24-2009

Re: 7.X LAN: any way to capture an ESC key and not close the form?

Raul gave me the answer...add an invisible button, make it the DEFAULT button. Make all other buttons Not Default.

When the user clicks on ESC, Enter, etc. then SLX goes to the default button.....handle the actions from there.....

RJ Samp
Please use plain text.
Copper Contributor
sgaykhe
Posts: 73
Registered: 04-15-2009

Re: 7.X LAN: any way to capture an ESC key and not close the form?

Hi RJ,

 

Nice Trick. Thanks for sharing.

 

Thanks and regards

Sandeep Gaykhe

Thanks and Regards
Sandeep Gaykhe
Firsteservice (I) Pvt. Ltd.
Please use plain text.
Bronze Contributor
rchavez
Posts: 91
Registered: 06-09-2009

Re: 7.X LAN: any way to capture an ESC key and not close the form?

Well, I am now here to claim my kudos points.... :smileywink:
Raul A. Chavez
http://raul.chavez.com
http://www.crmbi.com
Please use plain text.