control on event on exit (1 Viewer)

Jackske

Registered User.
Local time
Today, 15:26
Joined
Feb 28, 2000
Messages
48
I want a specific event to happen "on exit" of a field except if a specific "command button" is pressed.
How can I have my "event on exit" to control which button was pushed to exit the record?
Thanks,
Jackske-Belgium
 

Jack Cowley

Registered User.
Local time
Today, 13:26
Joined
Aug 7, 2000
Messages
2,639
Have the command button set a flag. Then check the flag when your On Exit code is fired. Depending on if the flag is set or not then do whatever it is you want to do. I hope I have your sequence of events in the right order....
 

Jackske

Registered User.
Local time
Today, 15:26
Joined
Feb 28, 2000
Messages
48
Dear Jack,
Thanks for your help.
My meaning is to check how the user leaves the field. Pushing 'Tab' button or on a command button that I put on the form.
To be honnest I do not know how to put a flag.
Regards,
Jack
Antwerp/Belgium
 

David R

I know a few things...
Local time
Today, 07:26
Joined
Oct 23, 2001
Messages
2,633
Trapping all the ways a user can exit a record 'except' for a command button might be problematic. They can click the [X] in the corner, go to File>Exit, File>Close Database, move to another record, use the navigation buttons, the scroll wheel on the mouse, pageup/pagedown...

I'd take a 'negative' approach instead. Behind the code for your command button, set a hidden checkbox field to "Yes" (-1) just before you execute the action. Then you can check for those instances/records where the value is still No (0), and you'll know how many records have been exited improperly.

Does that make sense?
 
Last edited:

Users who are viewing this thread

Top Bottom