D
DS
The following code works fine...when theres a record.
If there is no record I get an error message...No Record.
How do I fix this so if theres no record in the PaymentSubform the form
still closes.
Thanks
DS
Private Sub Cancel_Click()
DoCmd.GoToControl "PaymentSubform"
With Forms!Payment.PaymentSubform.Form.RecordsetClone
.MoveFirst
Do While .EOF = False
.Delete
.MoveNext
Loop
End With
DoCmd.Close acForm, "Payment", acSaveNo
DoCmd.OpenForm "LogOn"
End Sub
If there is no record I get an error message...No Record.
How do I fix this so if theres no record in the PaymentSubform the form
still closes.
Thanks
DS
Private Sub Cancel_Click()
DoCmd.GoToControl "PaymentSubform"
With Forms!Payment.PaymentSubform.Form.RecordsetClone
.MoveFirst
Do While .EOF = False
.Delete
.MoveNext
Loop
End With
DoCmd.Close acForm, "Payment", acSaveNo
DoCmd.OpenForm "LogOn"
End Sub