QuickBooks Error -6140, 0: When the Company File Will Not Open
Error -6140, 0 stops QuickBooks Desktop from opening the company file after damage, a move, or a network fault; our engineers explain how to clear it.
Error -6140, 0 belongs to the 6000 family of codes, and that family shares one meaning: QuickBooks Desktop could not open the company file. In our repair queue this code usually follows one of three events. The file was damaged, it was moved to a new computer or folder, or something broke on the network path to it.
The message you see
The dialog reads, in full:
An error occurred when QuickBooks tried to access the company file. Please try again. If the problem persists, contact Intuit Technical Support and provide them with the following error codes: (-6140, 0).
The wording is boilerplate shared across the whole 6000 series; only the code in parentheses changes. That closing line is part of the message text, not a step you need to act on.
What does the -6140, 0 code mean?
Codes in the 6000 family cover failures to reach or open a company file, whether it sits on a local drive or on a server. The -6140 code points at the open operation itself failing while QuickBooks reads the file, not at a lost network path or a locked file. The zero after the comma is the component code, and a zero carries almost no detail.
So the code tells you where the process stopped, not why. Work out the trigger before running any tool.
Common triggers
Five triggers cover the cases we see:
- Damage inside the company file, often after a power cut, a forced shutdown, or a backup restore that was interrupted partway through.
- A file moved or copied to a new machine, folder, or drive without its companion files, or a backup restored on top of an existing company file.
- Hosting switched on at more than one computer, or a dropped connection between a workstation and the server holding the file.
- A file last saved in a newer release of QuickBooks than the release now trying to open it.
- Windows permissions that deny the current user full control of the folder holding the file.
How do you fix error -6140, 0?
Work through the scenarios in order. Damage is the cause we see most often, so it comes first.
The file itself is damaged
- Copy the company file to a fresh folder on a local drive and work only on the copy. Never run repair tools on the only copy you have.
- Install the QuickBooks Tool Hub, open it, choose Company File Issues, and run QuickBooks File Doctor against the copy. Have the admin password ready; the scan asks for it.
- If the copy opens, choose File > Utilities > Verify Data. When Verify reports problems, run Rebuild Data, and run it more than once if problems remain.
- If File Doctor cannot open the copy, restore your most recent .QBB backup instead. Restore into a new folder rather than over an existing file, then verify the restored file.
- A portable company file (.QBM) is a second fallback when the backup also fails; restore it the same way.
The file was moved or restored
- Give the company file its own folder on the host machine or local drive, and keep it away from removable drives and synced folders.
- Close QuickBooks. In that folder, find the two files that share the company file's name but end in .ND and .TLG. Add .OLD to the end of each name, and QuickBooks rebuilds both when the file reopens.
- If the file arrived as a .QBB backup, restore it through QuickBooks itself rather than by double-clicking it.
Hosting or the network is at fault
- Open QuickBooks on each machine and press F2. The Hosting line should read "Local server only" on the computer holding the file and "Off" on every other machine.
- On any workstation showing the wrong value, choose File > Utilities > Stop Hosting Multi-User Access.
- Rename the .ND file as described above, remap the shared folder on the workstations, and open the file again.
The QuickBooks release is older than the file
- Press F2 and read the release number in the Product Information window.
- Update from the Help menu with Update QuickBooks Desktop, restart, and try the file again. Bring every machine to the same release, because mixed releases cause repeat failures.
How do you stop it coming back?
Keep a backup schedule that QuickBooks runs itself, and store one copy away from the server. Run Verify Data monthly so small faults surface early. Put the host machine on an uninterruptible power supply, and close QuickBooks cleanly at the end of each day. Keep the live file out of OneDrive, Dropbox, and similar sync folders; sync tools can corrupt a database file mid-write. Hold every installation on the same release.
When none of this opens the file, the damage sits in the data tables, where the rebuild utilities cannot reach it. Our engineers repair the file directly in those cases. Scoping the work takes the QuickBooks version and edition, whether multi-currency or advanced inventory is in use, and a screenshot of the F2 window with its counts.