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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"File is not open" error when quit program 1

Status
Not open for further replies.

MarnickBolle

Programmer
Feb 7, 2003
17
BE
When users quit our program, they get a question and when they say "Yes" they quit the program.

This is the code:

gnResult=Messagebox("Quit program?",32+4+256,"Program End")
if gnResult=6
set defa to &gcStartDirectory
=sqldisconnect(gnConHandle)
close all
clear events
set status bar on
set sysmenu to defa
endif

Sometimes users get a fatal error at line 5: close all. The error they get is: "FILE IS NOT OPEN" and they quit the program. This has no consequences, because the user asked to quit the program, but it's not very nice.

What can be the reason of this error-message?
 
MarnickBolle,

I once saw the same behaviour. I traced it one of the forms being closed. It contained a combo boxes that was populated by a table that was not open in the data environment. I don't remember the details, so I suggest you first try to find out which forms were open when the user got that message. Then try eliminating any combo boxes or list boxes from those forms to see if the problem goes away. That should at least tell you what is causing the error.

Report back if you get any more information.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Mike Lewis,

Thank you for this information. I think you can be right and I have to check this.

As soon as possible (next days I'm not at my office) I try it out.

Thanks a lot!

Marnick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top