Date Stamp based on Checkmark

  • Thread starter Thread starter Pete T
  • Start date Start date
P

Pete T

I have a Database which tracks log activity sent in by outside
sources, we require 1000 a week. When the logs arrive we will check a
box on the record that it was received. I need to data stamp that
checkbox entry, inorder to ensure the log was received within
prescribed time. I created a column in the query which looks at the
checkbox [rcd] and if -1 (checked) enters a date.
Iff([rcd]=-1,Date(),"")

For today I get today's date okay, but tomorrow the date will change
and thus defeat the idea. How can I set the date not to change. This
is imporatnt. Thanks

Pete
 
You will need to store the date in a field. Do you have field to store the
date in? Are you entering data directly into the query or do you have a form
that uses the query? If the former, I don't have a clue on how to force the
date to be stored when you click the checkbox. If the latter (using a form),
then you could use the after update event of the checkbox to set the date into
the datefield.

Private Sub YourCheckBox_AfterUpdate()
If YourCheckBox = True AND IsNull(YourDateField) then
YourDateField = Date()
End If
End Sub
 
I have a Database which tracks log activity sent in by outside
sources, we require 1000 a week. When the logs arrive we will check a
box on the record that it was received. I need to data stamp that
checkbox entry, inorder to ensure the log was received within
prescribed time. I created a column in the query which looks at the
checkbox [rcd] and if -1 (checked) enters a date.
Iff([rcd]=-1,Date(),"")

For today I get today's date okay, but tomorrow the date will change
and thus defeat the idea. How can I set the date not to change. This
is imporatnt. Thanks

Pete

You must have a date/time field (let's call it Datestamp) actually in
the table. I'd suggest doing all the data entry using a Form; in the
checkbox's AfterUpdate event use code like

Private Sub chkRcd_AfterUpdate()
If chkRcd = True Then
Me!txtRcdDate = Date()
End If
End Sub

There are no useful events on query or table datasheets to do this...
hence the form.
 
Back
Top