Hi,
I'm still a novice at VBA so forgive me is this is laughably easy!
I need to log the date a certain form is first accessed by the user, so I can display a message that further information will be required by a 14-day deadline. This date will also trigger certain actions later, so I need to store it.
The form's record source is a table which contains (among other things) a field called ActivationDate. I have put this on the form but kept it invisible. I'm trying to use code to log the date the user first opens this form. So far I've got
I've tried DoCmd.Save and I've tried Me.Update, but so far nothing works.
How should I go about this?
Thanks,
I'm still a novice at VBA so forgive me is this is laughably easy!
I need to log the date a certain form is first accessed by the user, so I can display a message that further information will be required by a 14-day deadline. This date will also trigger certain actions later, so I need to store it.
The form's record source is a table which contains (among other things) a field called ActivationDate. I have put this on the form but kept it invisible. I'm trying to use code to log the date the user first opens this form. So far I've got
Code:
If Me.ActivationDate.Value = Null Then 'If no date is yet stored, then
Me.ActivationDate.Value = Date 'store the current date.
DoCmd.Save '[COLOR="Red"]<-- what should I put here to physically write the date into the table?[/COLOR]
End If
:
:
...(rest of code for this form)...
:
I've tried DoCmd.Save and I've tried Me.Update, but so far nothing works.
How should I go about this?
Thanks,