What I have is a macro on a command button which when pressed does the following:
1) opens the append query: make table "work items temp"
2) opens the delete query: delete "work items"
3) opens the append query: make table "work items"
4) opens the delete query: delete "work items temp"
The sql on my guery is:
SELECT [work items temp].[Package ID], [work items temp].[Work Item ID], [work items temp].Description, [work items temp].[Unit of Measure], [work items temp].[Original Qty], IIf([variance type]="COR",[Original Qty]+[totalQty],[Original Qty]) AS [Client Qty], IIf([variance type]="Qty",[Client Qty]+[totalQty],[Client Qty]) AS [Control Qty], IIf([variance type]="PRO",[Control Qty]+[totalQty],[Control Qty]) AS [Forecast Qty], [work items temp].[Original Mhrs], IIf([variance type]="COR",[Original Mhrs]+[total Mhr],[Original Mhrs]) AS [Client Mhrs], IIf([variance type]="Qty",[Client Mhrs]+[total Mhr],[Client Mhrs]) AS [Control Mhrs], IIf([variance type]="Pro",[Control Mhrs]+[total Mhr],[Control Mhrs]) AS [Forecast Mhrs], [Qty/Mhrs Variances by WP Q].[Variance Type], nz([Total Mhrs],0) AS [Total Mhr], nz([Total Qty],0) AS TotalQty, [work items temp].[Original Start], [work items temp].[Original End], [work items temp].[Client Start], [work items temp].[Client End], [work items temp].[Control Start], [work items temp].[Control End], [work items temp].[Forecast Start], [work items temp].[Forecast End], [work items temp].[Status Method], [work items temp].Reference
FROM [work items temp] LEFT JOIN [Qty/Mhrs Variances by WP Q] ON ([work items temp].[Package ID] = [Qty/Mhrs Variances by WP Q].[Package ID]) AND ([work items temp].[Work Item ID] = [Qty/Mhrs Variances by WP Q].[Work Item ID]);
Cheers