This is so simple that I'm embarassed to post it, but I can't seem to solve this. I check to see if a table is in use, if it is I select it otherwise I open it. The following code will run through to the USE command and then error out with 'File is in use.' This seems so illogical because, by definition, it cannot be open as it just failed the if test checking to see if it is open.
Can someone see something that I do not?
Code:
IF USED(cTempNo)
SELECT cTempNo
APPEND BLANK
ELSE
SELECT 0
USE (cTempNo)
APPEND BLANK
ENDIF
Can someone see something that I do not?