Error "Unable to Remove This Transaction: An Open Apply Record Exists or An Apply Record Exists Outside the Selected Range" When Deleting Receivables Transaction History

This article has been archived. It is offered "as is" and will no longer be updated.
TechKnowledge Content

Error - "Unable to remove this transaction: An open apply record exists or an apply record exists outside the selected range" occurs when deleting Receivables Transaction history.


In order to maintain the integrity of the Receivables Historical Aged Trial Balance report, this message occurs because there is an open apply record within the removal range.


To get around this, the Print Historical Aged Trial Balance option will need to be turned off behind the scenes in Small Business Manager. You will then be able to delete the specific document.

Note - If you do this you should remove both the credit and debit documents to maintain integrity of the Historical Aged Trial Balance.

To turn off the Print Historical Aged Trial Balance option follow one of these resolutions depending on whether Small Business Manager is being run on Microsoft SQL Server 2000 or MSDE.

Resolution 1 - Microsoft SQL Server 2000.

Using SQL Query Analyzer, run the this SQL query against the company database (SBM0x):

update RM40101 set PRTHATRB = '0'

Resolution 2 - MSDE - Use batch file.

By default Small Business Manager is installed with MSDE, which does not have SQL tools such as SQL Query Analyzer. In this situation, a batch file can be run to execute a SQL query.

1. Download the file to the hard drive of the Small Business Manager server machine.

2. Extract the contents of the file to the hard drive of the Small Business Manager server machine. You will now have a RMPrintHATB.bat file.

3. Edit the batch file using Notepad to add the 'sa' password after the -P parameter (if applicable). Also, change the database name from SBM0x to the name of this company's database (i.e. SBM01).

4. Save and close the batch file.

5. Run the batch file from the Small Business Manager server machine by double-clicking on it.

Resolution 3 - MSDE - Use WinSQL.

If you are unsuccessful running the batch file you may download the WinSQL tool to execute the SQL Query.

1. Follow this link to download the WinSQL Lite file to your hard-drive: .

Note - This third party product is a free program called WinSQL Lite that can be used to run SQL scripts.

2. Once the file is saved to your hard drive, unzip the file and save the executable file (Winsql.exe) to the hard drive.

3. Launch the Winsql.exe file and login to your SBM data source.

4. Copy and paste the following SQL query into the query window. Use the green arrow on the tool bar to execute the query (or go to Query | Execute).

update SBM0x..RM40101 set PRTHATRB = '0'

Note - Replace SBM0x with the name of this company's database (i.e. SBM01).

Once you have successfully run the SQL query using one of the above methods, you can attempt deleting receivables transaction history.

Once you have successfully deleted receivables transaction history, you can turn the Print Historical Aged Trial Balance option back on by changing the PRTHATRB = '0' parameter to PRTHATRB = '1' in each of the scripts. This is optional depending whether or not the customer intends to use the Historical Aged Trial Balance reports in the future.

This article was TechKnowledge Document ID: 29003

Article ID: 858479 - Last Review: 12/30/2014 09:55:00 - Revision: 3.0

  • kbnosurvey kbarchive kbmbsmigrate KB858479