D
dhoover via AccessMonster.com
For some reason I cannot get this piece of code to work. I'm trying to
figure if the ReportingDate (current month end) is not = to the clients
YearEnd or the YearEnd plus three month, or minus three months or plus 6
months the LBRRecd field should display "n/a"
The problem I am having it it figures invalid monthend dates (1/30, 7/30, etc.
) This is the code:
Date1 = CDate(DateAdd("m", 3, rst3!YearEnd))
Date2 = CDate(DateAdd("m", -3, rst3!YearEnd))
Date3 = CDate(DateAdd("mm", 6, rst3!YearEnd))
If rst2!LBR = "quarterly" And rst!ReportingDate <> Date1
And _
rst2!LBR = "quarterly" And rst!ReportingDate <> Date2 And
_
rst2!LBR = "quarterly" And rst!ReportingDate <> Date3 And
_
rst2!LBR = "quarterly" And rst!ReportingDate <> rst3!
YearEnd Then
rst!LBRRecd = "n/a"
End If
figure if the ReportingDate (current month end) is not = to the clients
YearEnd or the YearEnd plus three month, or minus three months or plus 6
months the LBRRecd field should display "n/a"
The problem I am having it it figures invalid monthend dates (1/30, 7/30, etc.
) This is the code:
Date1 = CDate(DateAdd("m", 3, rst3!YearEnd))
Date2 = CDate(DateAdd("m", -3, rst3!YearEnd))
Date3 = CDate(DateAdd("mm", 6, rst3!YearEnd))
If rst2!LBR = "quarterly" And rst!ReportingDate <> Date1
And _
rst2!LBR = "quarterly" And rst!ReportingDate <> Date2 And
_
rst2!LBR = "quarterly" And rst!ReportingDate <> Date3 And
_
rst2!LBR = "quarterly" And rst!ReportingDate <> rst3!
YearEnd Then
rst!LBRRecd = "n/a"
End If