Hello to everyone who takes a look at my question and thanks in advance.
I have written this code for a date field. Once the value of one field changes I would like the value of the date field to default to a set date.
So once the field 'File_Description' = "Perm File". This will trigger the field 'ExpectedArchiveDate' to = 12/31/2099. The only place that I have found where it works is in the on click event of ArchiveDate.
'Here is the code
Private Sub ArchiveDate_Click()
Dim Holdvalue As String
Dim FutureDate As Date
Holdvalue = "Perm File"
FutureDate = "12/31/2099"
If Me.File_Description.Value = Holdvalue Then
ExpectedArchiveDate = FutureDate
Else
ExpectedArchiveDate = ""
End If
End Sub
Thanks,
Tofias1
I have written this code for a date field. Once the value of one field changes I would like the value of the date field to default to a set date.
So once the field 'File_Description' = "Perm File". This will trigger the field 'ExpectedArchiveDate' to = 12/31/2099. The only place that I have found where it works is in the on click event of ArchiveDate.
'Here is the code
Private Sub ArchiveDate_Click()
Dim Holdvalue As String
Dim FutureDate As Date
Holdvalue = "Perm File"
FutureDate = "12/31/2099"
If Me.File_Description.Value = Holdvalue Then
ExpectedArchiveDate = FutureDate
Else
ExpectedArchiveDate = ""
End If
End Sub
Thanks,
Tofias1