Thx,
Nice observation, where can I put the code ?
The code uses the info from tedit to search in a db and extract a description so it populates other tedit an tlabel components.
TIA
Ramiro
You can simply raise a flag in TEdit.OnChange and then check it into the TEdit.OnExit if your intention is not to do the search when the form is about to close.
Thought about that, too, but don't think it would work.
@TS
Thx,
Nice observation, where can I put the code ?
The code uses the info from tedit to search in a db and extract a description so it populates other tedit an tlabel components.
TIA
Ramiro
Depends what other controls are on your Form.
Let's say, you have 2 (or more) TEdits.
You enter your stuff in TEdit1, and when you Tab/click forward to the next TEdit, it grabs something from a DB, and shows it in another TEdit or TLabel (or whatever).
If that's the case, then i would put the "Grab from DB"-Code not in the OnExit of TEdit1, but in the OnEnter (Or whatever the event's name) of TEdit2.
That way, if you are in TEdit1, but then click on your Button, that "Grab from DB"-Code is not executed, since that code resides in TEdit2, which never gets entered.
But that's just a guess now, since we don'T know how your form is designed