text box dependant upon check box

  • Thread starter Thread starter shinton
  • Start date Start date
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!
 
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
 

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

Back
Top