Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 23 JUN 2003 07:34:47PM John S Edgar wrote:

Heloo everyone.

We have a window on which the last edit field is called 'answer'. Whenever the user clicks or tabs while the cursor is in the 'answer' field, a validation lostfocus is fired and the record is saved. (We have an 'option' set up on F9 (a menu item with an F9 accelerator) to save the current record.) However, if the user hits F9, the lostfocus validation on 'answer' appears to be missed or skipped. Should this be happening and if not, does anyone have any suggestions of why this might be happening and what I should look for?

Thanks. John.


At 23 JUN 2003 09:41PM Richard Hunt wrote:

We have a window on which the last edit field is called 'answer'. Whenever the user clicks or tabs while the cursor is in the 'answer' field, a validation lostfocus is fired and the record is saved. (We have an 'option' set up on F9 (a menu item with an F9 accelerator) to save the current record.) However, if the user hits F9, the lostfocus validation on 'answer' appears to be missed or skipped. Should this be happening and if not, does anyone have any suggestions of why this might be happening and what I should look for?

John,

I think your problem can be solved by doing the following…

Using the "Form Designer", menu item "menu" then "design"… the "Menu Builder". Make sure that menu item has the style "Generate lost focus event" checked. That should allow the lostfocus event to happen. By default a lostfocus event does not happen.

I got this info from The Sprezzatura Group post.


At 24 JUN 2003 02:49AM Donald Bakke wrote:

John,

Richard's response should address your need to generate a LOSTFOCUS event. However, based on my understanding of how you have designed your system you may fall into the trap of attempting to save your record twice: Once because the user pressed F9 while in the "answer" editline and twice because your LOSTFOCUS event will call the save logic after validation.

There are ways of avoiding this. It's hard to tell what the best and easiest one would be in your situation without more details. If you want help with this then let us know.

[email protected]

SRP Computer Solutions, Inc.


At 24 JUN 2003 11:37AM John S Edgar wrote:

Thank you, Richard, I will check that out.

John


At 24 JUN 2003 11:40AM John S Edgar wrote:

Thank you, Donald. I will check your concerns but I think we have the validations and save routines separate, and the LOSTFOCUS and F9 both call the same 'save' routine.

Thanks.

John.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/da87521caa1733e685256d4e00818733.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1