D
DrEvil
Hi guys,
my question is about looping, I have payments form and within it I have
continuous subform, I have checkbox called PaidInFull on subform which I
check to see if this return has been paid in full, we can have multiple
partial payments or one full payment.
I'm using this loop code to check if PaidInFull has been set to true in any
of the records in continuous sub-form and If I find it I would exit loop and
set form properties.
It only works it the first record is paid in full, if 3rd record is the one
that tripped paid in full checkbox it will not work and when I debug it tell
me that value is 0 and it's not but it loops just fine through each record...
any reason for this;
Dim rst As Object
Set rst = Me.RecordsetClone
If rst.RecordCount > 0 Then
rst.MoveFirst
Do While Not rst.EOF
If PaidInFull = True Then
Form.AllowAdditions = False
Form.AllowDeletions = False
Form.AllowEdits = False
Exit Sub
ElseIf PaidInFull = False Then
Form.AllowAdditions = True
Form.AllowDeletions = True
Form.AllowEdits = True
End If
rst.MoveNext
Loop
End If
Set rst = Nothing
Thanx for all the help!
my question is about looping, I have payments form and within it I have
continuous subform, I have checkbox called PaidInFull on subform which I
check to see if this return has been paid in full, we can have multiple
partial payments or one full payment.
I'm using this loop code to check if PaidInFull has been set to true in any
of the records in continuous sub-form and If I find it I would exit loop and
set form properties.
It only works it the first record is paid in full, if 3rd record is the one
that tripped paid in full checkbox it will not work and when I debug it tell
me that value is 0 and it's not but it loops just fine through each record...
any reason for this;
Dim rst As Object
Set rst = Me.RecordsetClone
If rst.RecordCount > 0 Then
rst.MoveFirst
Do While Not rst.EOF
If PaidInFull = True Then
Form.AllowAdditions = False
Form.AllowDeletions = False
Form.AllowEdits = False
Exit Sub
ElseIf PaidInFull = False Then
Form.AllowAdditions = True
Form.AllowDeletions = True
Form.AllowEdits = True
End If
rst.MoveNext
Loop
End If
Set rst = Nothing
Thanx for all the help!