Date Time stamp on a check box

  • Thread starter Thread starter Haji
  • Start date Start date
H

Haji

Hello,

I have a form which has Name, Address etc and a check box
called SentLetter. What I want to do is to create some
kind of date time stamp for when it was checked. When I
do a report, I would like to have the name of everyone
who we sent a letter to and when the date that the box
was checked. Is it possible to do this?

Thanks,

Haji
 
Haji said:
Hello,

I have a form which has Name, Address etc and a check box
called SentLetter. What I want to do is to create some
kind of date time stamp for when it was checked. When I
do a report, I would like to have the name of everyone
who we sent a letter to and when the date that the box
was checked. Is it possible to do this?

Thanks,

Haji

You need a field in each record for the time stamp. Maybe you'd call
that field "WhenSent". Then you'd include this field in your form's
RecordSource. You need not necessarily have a control on the form to
display it. You'd create an event procedure for the SentLetter check
box like this:

'----- start of example code -----
Private Sub SentLetter_AfterUpdate()

If Me.SentLetter = True Then
Me.WhenSent = Now()
Else
Me.WhenSent = Null
End If

End Sub
'----- end of example code -----

Your report's recordsource query would then select the records that have
SentLetter=True, and would include the WhenSent field for display.
 
Back
Top