I am writing an app in 6i where a user can enter data on a form or click a search button to bring up the search form. On the search form they can enter some conditions and select the record they want to edit from a list of records that matched their search. Then this form closes and the data entry form is populated with the data from the record they selected so that it can be edited. The problem is that sometimes when the search form closes it works fine and switches back to the data entry form. Other times it appears to work fine but as soon as the data is populated on the data entry form the data entry form closes. This never happens in debug mode so I have no idea how to figure out what is happening. Anyone seen this before?