After I do a recalc the focus moves to first record. I tried to use a bookmark. Im not really sure how that code workes , I found it on the internet. I got an invalid use of bookmark...where the code said control source, I just replaced it with a control source on the form ??
Private Sub Amount_AfterUpdate()
If Commission = True Then
Comm = Me.Amount * Me.Parent.Percent
Comm = 0
'Calculate the Subtotals
strWhere = "(TransType <> 'PAY') And [Commission] = True"
Me.Parent![Prem] = DSum("Amount", "InvoiceDataQ", strWhere)
'to update subtotals
'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.Bookmark = BM