Ready to get started with anonymous questions today? It's easy! Learn more.
Private Sub Amount_AfterUpdate() If Commission = True Then Comm = Me.Amount * Me.Parent.Percent Else Comm = 0 End If Me.Requery 'Calculate the Subtotals 'Calculate Premium strWhere = "(TransType <> 'PAY') And [Commission] = True" Me.Parent![Prem] = DSum("Amount", "InvoiceDataQ", strWhere) 'to update subtotals Me.Parent.Recalc 'I replaced the sbove Me.Recalc with the Code Below. I dont understand why the Dim BM was Remmed . I tried it both ways ' Dim BM as Variant Dim rst as Recordset set rst = Me.RecordsetClone If rst.RecordCount >0 then Me.Recalc Me.Bookmark = BM Me.(next Control).SetFocus Else Me.Recalc Me.(next Control).SetFocus End If 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.