Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.
Private Sub DeleteRecord_Click() Dim rs1 As ADODB.Recordset Dim DeletedItemID As Long DeletedItemID = Me!ItemID DoCmd.DoMenuitem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuitem acFormBar, acEditMenu, 6, , acMenuVer70 DoCmd.RunSQL "DELETE FROM dbo.WorkOrderItems WHERE ParentItemID = & DeletedItemID Dim calculatedfreight as Currency calculatedfreight = Round(DSum("Price","WorkOrderItems","ItemType = 1 and WorkOrderID = " & WorkOrderID) * .024, 2) DoCmd.RunSQL "UPDATE dbo.WorkOrders SET Freight = " & calculatedfreight & " WHERE OrderID = " & WorkOrderID End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.