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

File is in use!!!

Status
Not open for further replies.

Collin79

Programmer
Dec 31, 2000
31
MX
Hi!!

I need help here, I'm testing a new form and I receive the message that File is in use, so I go to command window and do a Close databases and then I can continue. I've tried to assign this command on the form in the Init or load event but doesn't work.

Somebody may help me please!!

 
Hi Robert:

this is the line:

open database c:\sia1\dbf\main
Use c:\sia1\dbf\companies
 
The most likely situation, then, is that companies is already open in another work area.

Here's a demonstration of how to cause the error:

[tt]close all
use MyTable
select 0 && different work area
use MyTable && error occurs [/tt]

The alternatives include:

* A *
if used("companies")
select companies
endif

* B *
use companies again alias comp2[/tt]

Robert Bradley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top