speakers_86
Registered User.
- Local time
- Today, 12:57
- Joined
- May 17, 2007
- Messages
- 1,919
Another thing that should be simple. I can't stand getting stuck on the easy parts.
If both if statements are true, then I don't want the form to close. Right now I have the code inside the subform's before update event. I am not sure if that is where it should be. I tried to put it in the parent form's before update event, but that did nothing. It seems like by the time this code fires, txtremaining is already unavailable.
Code:
Private Sub TransactionSubAmount_BeforeUpdate(Cancel As Integer)
If Me.Text8 <> 0 Then
If Me.Parent.txtRemaining <> 0 Then
Cancel = True
End If
End If
End Sub
If both if statements are true, then I don't want the form to close. Right now I have the code inside the subform's before update event. I am not sure if that is where it should be. I tried to put it in the parent form's before update event, but that did nothing. It seems like by the time this code fires, txtremaining is already unavailable.