Help with check box validation

  • Thread starter Thread starter Woon Moh
  • Start date Start date
W

Woon Moh

Here is a beginner's question:

I am setting up a simple form so everytime the user enter
a check box, it will show the current time. It's
basically 2 fields, a check box and time.

I tried putting a IIF statement in the time field but to
no avail. Is there something wrong with my IIF or the way
it was setup?

=IIf([Verification]="Yes",Time(),Null)

Appreciate any help. Thanks.
 
So, you want the textbox to display the time when the checkbox is checked?

In the chkYourCheckBox_AfterUpdate event, add something like:

If Me!chkYourCheckBox = True Then
Me!txtYourTimeTextBox = Now()
Else
Me!txtYourTimeTextBox = Null
End if

You'll need to format the results of the Now() function to get it to show
only time-of-day.

Good luck

Jeff Boyce
<Access MVP>
 
Back
Top