insert date in field when checkbox is checked

  • Thread starter Thread starter david
  • Start date Start date
D

david

Is there a way to have a date field put in the current
date when a check box is checked on a form? For example
the form has a date field for accepted date and a check
box for accepted. I would like when the accepted box is
checked it puts the date in the accepted date field.
 
-----Original Message-----
Is there a way to have a date field put in the current
date when a check box is checked on a form? For example

Hi -- I'm new to Access so a lot of things still confuse
me, but I can say I got something similar to what you want
working. In my case, the field on the form was bound to a
field in my database record. At the time I want today's
date entered, in VBA I execute code saying

Me.Recordset.Fields("CommentDate") = Now

This puts today's date and time in the database, and the
field updates to reflect this.

I'm not sure what to do if your text control is just text,
not bound to a database field, but probably you can format
the output of Now as a string and use that.

Bob
 
Back
Top