This behavior is expected since the KeyPress event updates the object.controlsource/value. Perhaps a NODEFAULT call when you have a valid PO returned will correct this behavior.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Peter Hart Sent: Tuesday, August 04, 2009 8:24 AM To: [email protected] Subject: RE: R: VFP9 SP2: Form caption strangeness I have a similar problem with a text box. The employee enters the first number of a purchase order and a form opens which allow him/her to either carry on typing or select from a list the purchase order they want to edit or view. In the key press the code calls the model form. On closing the form saves the PO. no. In a global object. The calling form searches for that PO. and then populates the form with the PO details. The last thing it does is fill the text box with the PO No. Whenever they search the text box fills with the 1st PO. No on the system. Watch in the debugger and the textbox has the right value in it then as you leave the Key Press method it reverts to the 1st PO No. I have had to leave the problem for now but will look at it again when time permits or someone comes up with a suggestion. Cheers Peter Peter Hart Computers _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/000101ca1508$5ff788a0$1fe699...@com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

