On Click Even with If Statement

C

Curtis Stevens

I'm having a little trouble.

Discover Paid (a check box)
Discover Paid Date (a text box)

Discover Paid Control Name = DiscoverPaid
Discover Paid Date Control Name = DiscoverPaidDate

When I click on the check box for Discover's been Paid, it will then put
today's date into the Paid Date box, but only if it is checked, value = Yes.
But when you uncheck it, it clears the text box, so there is only a date when
the check box is checked and always empty when not checked or has been
unchecked.

I'm assuming you put this code in the on click event? I'm having trouble
with the coding too. :)

Thanks for your help!

Curtis
 
C

Curtis Stevens

I figured it out, woo hoo! I kept trying Yes, No, etc. True/False was the
prob!

If Me.DiscoverPaid = True Then Me.DiscoverPaidDate = Date
If Me.DiscoverPaid = False Then Me.DiscoverPaidDate = Null
 
R

ruralguy via AccessMonster.com

<< AIR CODE >>
Private Sub DiscoverPaid_Click()

If Me.DiscoverPaid Then
Me.DiscoverPaidDate = Date()
Else
Me.DiscoverPaidDate = Null
End If

End Sub
 
Top