Help with check box validation

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.
 
J

Jeff Boyce

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top