Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On a FoxPro 6.0 form I can't close or go to design mode

Status
Not open for further replies.

Rahel

Programmer
Feb 16, 2000
30
0
0
GB
When you create a form and edit some of the data, it is not possible to close the form or enter design mode. The following error message is displayed:<br>
<br>
&quot;File cannot be closed because outstanding references exist&quot;<br>
<br>
The only option left is to close FoxPro and re-open the form. Is there a simple solution to this problem?<br>
<br>
Can anyone shed some light on this problem.
 
Rahel, how are you creating an instance of the form? Are you using DO FORM? Are you doing anything unusual in creating the objects on the form?<br>
<br>
The help for error# 1184 says:<br>
&quot;Outstanding references exist to an object in this form or form set.&quot;<br>
<br>
My WAG is that there is some external reference (such as a memory variable, or perhaps a property of type object) to this form or something on it.<br>
<br>
Not much help, but at least a few more questions!
 
This type of problem is hard to correct because nobody can see your code, Like the above post I agree you have created some object that is not being released when you try to release the form I would suggest you put a &quot;set step on&quot; right before the thisform.release in your code that closes the form and pop into the debug window to see what objects you have created if you see any objects that are used in the form that are not needed elsware in the app place a &quot;release objectname1,objectname2&quot; in the destroy event on the form. if you want to restore the design time environment after running a misbehaving form,code,... you can type in the command window<br>
<br>
release all<br>
close all<br>
clear all<br>
<br>
one of the above should release the offending object so you can re-enter design mode for the form. <p>Steve Bowman<br><a href=mailto:steve.bowman@wayservices.com>steve.bowman@wayservices.com</a><br><a href= > </a><br>
 
I know that error too. It happens when you create an object reference somewhere in your form code. Maybe using createobject(). If you don't release this object before trying to close the form, the error ocurrs. When it happes to me I issue the command clear all in the command window and that's enough<br>
<br>
Excusame if my English is not good<br>
Edwin Dalorzo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top