dmarsh16946
Technical User
Have main form storing contact details, with subform storing payments. I'm coding the payments as they are added but want also to do the same to several records as a batch.
In more detail :-
Payments have to be flagged as 01 if the first after a set date, then 17 thereafter. I'm using an after update procedure to do this, a slight complication being the set date may change, leading to a second or subsequent 01 payments.
The subform AfterUpdate event includes this :
With Me.RecordsetClone
.MoveFirst
Do Until .EOF
.Edit
If !PaymentType = "Direct Debit" Then
If !DateReceived = DLookup("DateReceived", "qryFirstAfterAgreementDate") Then
!TransactionCode = "01"
Else
If !DateReceived < DLookup("DateReceived", "qryFirstAfterAgreementDate") Then
GoTo Jump
ElseIf !DateReceived > DLookup("DateReceived", "qryFirstAfterAgreementDate") Then
!TransactionCode = "17"
End If
End If
End If
.Update
Jump:
.MoveNext
Loop
End With
I'd like to be able to do the same check for a batch of records. This is because some people pay a fixed amount monthly and I'm using an append query to identify them and apply the payments to the data source for the subform.
Trouble is this doesn't trigger the 01/17 allocation.
Suggestions gratefully received.