Mike Vytal
Registered User.
- Local time
- Today, 10:54
- Joined
- Feb 1, 2007
- Messages
- 34
First, let me say, I've searched and searched, and have been trying to make sense of all the posts, but they all seem to point to reports and not forms.
What I'm trying to do is simple. On my main form, I have a checkbox called 'Inactive'. I have an Activities subform, which has a Class Date. If the class date is more than 1 yr old, I want the Inactive box to equal "Yes", but if there are no records in the Activities subform, I get the Error 2427, you entered an expression that has no value.
My code is below. What am I doing wrong? Thanks in advance!
If Nz(Me![ParticipantActivity subform].[Form]![ProgramClassDate], #1/1/2020#) > DateAdd("yyyy", -1, Date) Then
Me!Inactive = False
Else
Me!Inactive = True
End If
What I'm trying to do is simple. On my main form, I have a checkbox called 'Inactive'. I have an Activities subform, which has a Class Date. If the class date is more than 1 yr old, I want the Inactive box to equal "Yes", but if there are no records in the Activities subform, I get the Error 2427, you entered an expression that has no value.
My code is below. What am I doing wrong? Thanks in advance!
If Nz(Me![ParticipantActivity subform].[Form]![ProgramClassDate], #1/1/2020#) > DateAdd("yyyy", -1, Date) Then
Me!Inactive = False
Else
Me!Inactive = True
End If
Last edited: