if thisform.opendataerror MessageBox("Someone is using the system exclusively") return (.F.) endifNext up, open a file called test in the data environment. In the ERROR method of the data environment put the code.
do case case nError = 1705 && Access Denied thisform.opendataerror = .T. case nError = 1995 && Unable to init data env thisform.opendataerror = .T. case nError = 1967 && Data Env already unloaded * Do nothing - caused by a previous Init Error otherwise ERROR nError, endcaseAt the command prompt, open TEST.DBF exclusive and run the form. Does yours die and excruciatingly painful death? Mine does every time. This method worked great in VFP6 but dies every single time in 7.0.