Dexter is halfways on the right track. If you open a table twice on the same station and it's current datasession, this error happens, for example if you
USE sometable IN 0 twice (The IN 0 is not the important part, but if you do USE sometable twice you reopen the same table in the same workarea and therefor don't get that error, as it's still just in use once). If a lock is done the error would rather be "File is in use by another user", that's a totally different error, just starting with the same text.
So, if you don't abbreviate the real error, then your fault is to open a table twice. It actually is not imposible, as you can USE sometable AGAIN, you just also need to give it a different alias name, so USE sometable alias smetable2 AGAIN is possible, for example. But surely you won't want to make use of that, if follow up code is using the normal table name.
The error can be avoided by SELECT table instead of USE table, as Dexter says. But you typically open all tables of your form at form start, either in the dataenvironment or in Load or via any data access classes of a framework, whatever. Once tables are open you only need to SELECT table, if that's needed at all.
If you want to use some table only, if they need to be used, and a button click has USE sometable in it, then you can easily get this error, if that button is clicked for the second time. You can be lucky, if the currently selected workarea is that table it won't error, so often enough a test of clicking some button twice will not reveal this error. This is the thing, that makes this error so tricky.
It's not really a natural concept, as using a table mostly means to FOpen a dbf (and validate a header and prefetch a record, perhaps, but mostly FOpen), you don't expect this won't work. In the old days you only had 15 workareas, therefore it was an important clue, that you're reusing the same table twice. That's the historic reasoning of that error.
If that error happens because two forms open the table, make sure you separate them by letting forms use private datasessions, then you on't have that disadvantage.
Bye, Olaf.