Insert Date/Time to new field once a checkbox is clicked

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that I am using that has four status checkboxes (25%
Complete,50% Complete, 75% Complete, Complete). I want to record the
date/time to a set field in my database once the status button is checked. I
am assuming that I must use the "On Click" part of the properties window, but
am unsure on the code to enter in.

(I am using MS Access 2003)
Thanks in advance.
Aaron
 
I have a form that I am using that has four status checkboxes (25%
Complete,50% Complete, 75% Complete, Complete). I want to record the
date/time to a set field in my database once the status button is checked. I
am assuming that I must use the "On Click" part of the properties window, but
am unsure on the code to enter in.

(I am using MS Access 2003)
Thanks in advance.
Aaron

Everytime any one of these check boxes is checked?
Include that Date Field in the form.

Code each ckeck box's AfterUpdate event:
Me.[DateField] = Now()

Only if it is a new record?
Code each check box's AfterUpdate event:
If Me.NewRecord then
Me![DateField] = Now()
End If

The DateField will contain the date and time the last check box was
checked.
 
Thanks for the help and the quick response.

fredg said:
I have a form that I am using that has four status checkboxes (25%
Complete,50% Complete, 75% Complete, Complete). I want to record the
date/time to a set field in my database once the status button is checked. I
am assuming that I must use the "On Click" part of the properties window, but
am unsure on the code to enter in.

(I am using MS Access 2003)
Thanks in advance.
Aaron

Everytime any one of these check boxes is checked?
Include that Date Field in the form.

Code each ckeck box's AfterUpdate event:
Me.[DateField] = Now()

Only if it is a new record?
Code each check box's AfterUpdate event:
If Me.NewRecord then
Me![DateField] = Now()
End If

The DateField will contain the date and time the last check box was
checked.
 
Back
Top