Checkbox Date/Time stamp

G

Guest

I have a form that I need to collect a time/date stamp (Now) on the Table,
but the field is not on the form.
I have entered a Yes/no field on the table-Checkbox on the form
I have entered a Date field on the table- No field on the form.
Here is my code

Private Sub Check12_AfterUpdate()
If Checkbox12 = True Then
Me.Form.test1_query.resolved entered = Now()
Else
Me.Form.test1_query.resolved entered = Null
End If
End Sub

I tried changing the form.test1_query to the name of the table-no luck.
Can this be done?
 
G

Guest

Thanks,
I figured it out and rewrote my code to look like this;

Private Sub Check12_AfterUpdate()
If Checkbox12 = 0 Then
Me![resolved entered] = Now()
Else
Me![resolved entered] = Null

End If
End Sub

Where resolved entered is the field I want the date to go into in the table.
I am not sure why the other post had the form name but this works.
 

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

Top