Sometimes a file must be closed before another Open or other operation can occur. This error has the following causes and solutions:
You must close a file opened for one type of sequential access before opening it for another. For example, you must close a file opened for Input before opening it for Output.
Close the file before executing the statement.
For additional information, select the item in question and press F1.