Link to home
Start Free TrialLog in
Avatar of cansevin
cansevin

asked on

Auto Date when Check box Cheked

I have a check mark box titled ContractSentCheck... I'd like coding for an On-Click event that when the check marked is clicked it will update the field DateContractSentChecked to the current Date and Time (of the click).

Then if the check marked is checked off, it will delete this time stamp. And if check back on it will update the time stamp. Any ideas? Just a warning, I'm an idiot at this stuff, thanks!
Avatar of VTKegan
VTKegan
Flag of United States of America image

In the AfterUpdate event of the check box place code like this:

If ContractSentSentCheck = True Then
Me.DateContractSentChecked = Now()
Else
Me.DateContractSentChecked = ""
End If

Avatar of cansevin
cansevin

ASKER

Below is the code I have, for some reason, no errors come up but nothing happens to the field DateContractSentChecked on the form... any ideas?

Private Sub ContractSentCheck_AfterUpdate()
If ContractSentSentCheck = True Then
Me.DateContractSentChecked = Now()
Else
Me.DateContractSentChecked = ""
End If
End Sub
ASKER CERTIFIED SOLUTION
Avatar of VTKegan
VTKegan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Vt... thanks for your help, it worked and I feel like a genius for some reason. I appreciate it!