Even OnExit

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all
I have created a textbox and set a code to find the a record in defferent table using event ONExit, if it finds it then the record will be displayed, if not user gets error message. The problem is, whenever I click close ( I also created a Close button to close the form) it still triggers the EXIT even on that textbox, how should I prevent this? or I used the wrong method
Any help would be appreciated

Cheers
Djoez
 
Try moving the code to the textbox's AfterUpdate event handler.

Hope That Helps
Gerald Stanley MCSD
-----Original Message-----
Hi all,
I have created a textbox and set a code to find the a
record in defferent table using event ONExit, if it finds
it then the record will be displayed, if not user gets
error message. The problem is, whenever I click close ( I
also created a Close button to close the form) it still
triggers the EXIT even on that textbox, how should I
prevent this? or I used the wrong method?
 
Thanks for the respond
I tried that one too, it worked when the user didn't make any changes on the textbox but if they did the code will be executed. They'll still receive the error message before the form is closed
I was thinking of putting a condition where the code will be skipped if user press close button
any ideas

Djoezz
 
Back
Top