none
Abnormal delay to run an append query RRS feed

  • Question

  • Hi


    One of my split database has an append query which is set to run on the event of the unloading form. But whenever I close the form it takes abnormal delay in running that query.

    Private Sub Form_Unload(Cancel As Integer)
    On Error Resume Next
    DoCmd.OpenQuery ("AppendToIssueSbase2")
    End Sub

    The sql of the append query is

    INSERT INTO IssueSbase2 ( SibNo, SibNoM, Dateissue, CntrMode, VehID, jno, TransactionID, StockId, BulkId, Category, Nomenclature, QtyIssued, Scale, Cost, PoNo, PoDt, CompanyID )
    SELECT TRANSACTION.CntrID, COUNTER.SibNo, COUNTER.CntrDt, COUNTER.CntrMode, COUNTER.VehID, COUNTER.jno, TRANSACTION.Tid, TRANSACTION.StockId, Stock.BulkId, Stock.Category, Stock.Nomenclature, TRANSACTION.Qty, Stock.Scale, [Qty]*[Rate] AS Cost, COUNTER.PoNo, COUNTER.PoDt, COUNTER.CompanyID
    FROM ([TRANSACTION] INNER JOIN [COUNTER] ON TRANSACTION.CntrID = COUNTER.CntrID) INNER JOIN Stock ON TRANSACTION.StockId = Stock.StockId
    WHERE (((TRANSACTION.Tid) Not In (SELECT [TransactionID] FROM [IssueSbase2])) AND ((COUNTER.CntrFlag)="Supply"));

    Is there any way to expedite the running speed of this query?

    I was redirected to post this query to MSDN Forum by MS Community

    Thank you.

    Saturday, November 10, 2018 4:57 AM

Answers