Important: Ensure that your QuickBooks Desktop is up to date. It is also recommended to install and run the QuickBooks File Doctor tool first before performing any of the following steps. If after using the tool and you still experience the issue, perform the following solutions in the order shown.
By doing this, you are testing if the problem possibly lies with your company file or the QuickBooks application. If a sample company file does not open and instead returns an error, it is an indication that the QuickBooks installation is damaged and should be repaired.
By copying the file on the desktop and opening it, you are testing if there is a problem with the location of the company file. If the file opens while it is saved on the desktop, it means the location is probably damaged or it is "too deep", it exceeded the file system path limitation. If the file still did not open after changing it's location, it is possible the file is damaged.
If the company file is damaged, it is recommended to use the Auto Data Recovery to restore your data.