自1994年以来,我一直在使用相同的程序,我从头开始写贷款服务。大约2个月前,当我们删除记录时,我们开始收到错误6。我将错误输入Google计算机并找到了此网站。我还发现我们已经达到了整数中交易数量的限制,所以我只是试图将变量重新标注为:
Sub DeleteTransactions_Click ()
Dim TransID As Long 'I just added this line
'On Error GoTo DeleteTransactionsError ' removed the on error so I could see
TransID = TransactionID 'added this
GlobalTransactionID = TransID 'modified from TransactionID to TransID
If MsgBox("Have the Transactions been Printed?", 4 + 48, "Confirm Printing") <> 6 Then Exit Sub
If MsgBox("Delete Transactions for Contract ID " & GlobalContractID & " ?", 4 + 48, "Confirm Contract") <> 6 Then Exit Sub
If MsgBox("Delete Transactions Starting with Transaction ID " & GlobalTransactionID & " ?", 4 + 48, "Confirm Transactions") <> 6 Then Exit Sub
DoCmd Hourglass True
我仍然收到错误6堆栈溢出。有没有人知道如何使这个工作?非常感谢!
答案 0 :(得分:0)
如果没有看到其余代码,则无法分辨,但您可能还需要将TransactionID和/或GlobalTransactionID更改为Long。这也是假设数据库中的表已被更改为在需要时处理它。