Perform data damage troubleshooting if, while backing up your QuickBooks company file, the following message appears:
A data problem prevents QuickBooks from continuing
One or both of the following error messages may also show in your QBWin.log after verifying data:
LVL_ERROR--Error: Verify Item History: Build txn target bad pending state. Item = nnnnn
LVL_ERROR--DB error -185 ErrorMessage:'SELECT returns more than one row' from file:'.\.\src\DMEDLSQLContactEditElement.cpp' at line 2679 from function:'DMEDLContactEditElement::LoadAdditional
Rebuilding the company file should resolve the issue, but manually editing the items specified in the log may still be necessary.
IMPORTANT: Ensure that your QuickBooks Desktop is up to date before you follow the steps shown below.
Solution 1: Rebuild and verify
- Rebuild data.
- To do this, go to File > Utilities > Rebuild Data.
- When prompted to back up the file, click OK.
- Once the message Rebuild has completed appears, click OK and proceed with the next step.
- Verify data.
- Go to File > Utilities > Verify Data.
- When you see the message QuickBooks detected no problem with your data, click OK. You can now continue using the file.
- If after verifying, QuickBooks detected the same problem, perform the next solution.
Solution 2: Identify and manually edit the damaged item
- Identify the item number using the QBWin.log.
- While QuickBooks is open, press F2 to open the Product Information window.
- Press F3 to open the Tech Help window and go to the Open File tab.
- Under Open File tab, look for QBWin.log then click Open.
- Once QBWin.log is open, press CTRL + F to bring up the Find window and search for the error.
- Take note of the item number in the error message.
- Export your item list and identify the damaged item.
- Go to File > Utilities > Export > Lists to IIF Files > Item List.
- Choose a location you prefer and click Save.
- Once saved, right-click the file and choose Open with Excel. (Or, open Excel and drag the file on to the spreadsheet).
- Locate the REFNUM, which matches the item number in the error message, and note the name of the item.
- Correct the item's quantity on hand (QOH).
- In the Reports menu, under Stock, select Stock Valuation Detail.
- Set the Date range to All.
- Locate the item and find the date when its quantity first became negative.
- You can either delete the "build assembly" that is involved with the negative on hand OR,
You can do an Stock Adjustment to increase the quantity of the item.
Consider the following information before adjusting stock assembly items:
- Decreasing the quantity of an stock assembly item may cause finalised stock assembly builds to change to pending status. Consider running the Pending Builds report before and after the stock adjustment so you can see if any builds were affected.
- Adjusting the quantity of an stock assembly item does not affect the quantity of its components (neither stock parts nor other stock assembly items) in the Bill of Materials. If you want to disassemble an stock assembly item and return its components to stock, you need to decrease the stock assembly item quantity and increase each component quantity accordingly.
- If you track serial or lot numbers, QuickBooks needs to add or remove serial/lot numbers when you adjust stock quantities. Therefore, you must assign serial or lot numbers to stock items before adjusting the quantity on hand.
To adjust the quantity of an stock item:
- Choose Suppliers > Stock Activities > Adjust Quantity/Value on Hand.
Choose Stock > Stock Activities > Adjust Quantity/Value on Hand.
Choose Stock > Adjust Quantity/Value on Hand.
- Click the Adjustment Type drop-down arrow and select: Quantity.
- Enter the date of the adjustment.
- Click the Adjustment Account drop-down arrow and then click the account where you want to track stock adjustments.
- You may want to create a new account just for tracking stock adjustments. You can use one account for all adjustments, or use an expense account for losses and shortages and an income account for gains. Consult your accountant if you aren't sure what type of account to use.
- If you need to make adjustments to multiple items and assign the adjustments to different accounts, you need to create multiple adjustments—one for each account.
- Click the Stock Site drop-down arrow and select the site to apply the adjustment to.
- (Optional) Enter a reference number.
- (Optional) If you want to assign this adjustment to a customer or job, click the Customer:Job drop-down arrow and then click a customer or job.
- (Optional) If you use class tracking, select the Class drop-down arrow and then choose a class.
- Click in the item column to add items. You can also add multiple items
- Enter the New Quantity or the Qty Difference in the appropriate column.
- In the Qty Difference column, enter the difference between the quantity currently in QuickBooks and the actual quantity.
- For example, if you need to reduce the quantity by five, enter -5 as the difference.
- (Optional) Enter a memo in the Memo field to remind yourself later why you made this quantity adjustment.
- Save the adjustment.
- Verify your file again.To ensure that the data issue is resolved, verify your company file again by going to File > Utilities > Verify Data.
- If the Verify Utility returns a message "QuickBooks detected no problems", your file is ready to be backed up.
- If the Verify Utility returns a message "A data problem prevents QuickBooks from continuing", continue with performing Solution 2.