# Unlock
{: .no_toc }

Releases a lock acquired with the [**Lock**](/tB/Core/Lock.md) statement, restoring access by other processes to the previously locked region of an open file.

The **Unlock** statement is documented together with **Lock** on the [**Lock, Unlock**](/tB/Core/Lock.md) page.

Syntax:
> **Unlock** [ **#** ] *filenumber* **,** [ *recordrange* ]

The arguments to **Unlock** must match exactly the arguments of the corresponding **Lock** statement. See [**Lock, Unlock**](/tB/Core/Lock.md) for full details.

> [!IMPORTANT]
> Be sure to remove all locks with an **Unlock** statement before closing a file or quitting the program. Failure to remove locks produces unpredictable results.

### See Also

- [**Lock** statement](/tB/Core/Lock.md)
- [**Open** statement](/tB/Core/Open.md)
- [**Close** statement](/tB/Core/Close.md)
