Thanks for looking at this. A few comments to help you decide the best approach to the problem:
At present as each character is typed in for a call, a name and qth lookup occurs if the name and qth fields are blank which of course means that if you are entering say zl2cde and zl2cd exists then the name and qth will be filled in as this is entered and the lookup will fail when the "e" is entered.
Two approaches (possibly more) can be made:
1. Don't do a lookup until {Enter} or {Tab} are keyed or the call edit box is exited.
2. On each key stroke, erase the name and qth edit boxes and let the lookup occur in the normal way.
Unfortunately this will introduce another problem:
If you have recorded zl2cd as the call and missed the last letter of what was really zl2cde due to qrm etc. and record the name and qth and later in the qso realise that there is an error in the call and fix it, amending the call will erase the correct name and qth you have already recorded.
Possibly using {tab} to exit the call edit box could allow you to exit without doing a lookup and any other method does a lookup.
Sorry I don't have a solution but at least I have flagged some of the problems.