text box dependant upon check box

S

shinton

Hello all,
I would appreciate a little help. I have a sub-form with a
check box titled "Corrected", when the user checks this box I would
like to have the text box I have created "Date Corrected" autopopulate
with the current date and time. Thanks in Advance!
 
R

Ron2006

Hello all,
I would appreciate a little help. I have a sub-form with a
check box titled "Corrected", when the user checks this box I would
like to have the text box I have created "Date Corrected" autopopulate
with the current date and time. Thanks in Advance!

If you allow the box to be checked and then unchecked:

In the afterupdate event of the checkbox

if me.correctedchkbx then
me.datecorrected = now()
else
me.datecorrected = null
endif

If you allow it only to be checked once
if me.correctedchkbx then me.datecorrected = now()

If you allow this last option you could end up with a corrected date
but the box NOT checked.

Ron
 
Top