K
kratz
I have a field called Updated. If the field is Yes, I would like the
UpdatedStartMonth, if it is No, I would like the OriginalStartMonth. I
designed an If/Then/Else statement but it was returning an #Error if Updated
was No. So I changed it to Case, just to see if it would work. Again, #Error
if Updated was No. I switched the criteria around so that if the field is No,
return OriginalStartMonth, etc. This returned values only if the field wasn't
Updated and returned #Error if Updated was Yes. It seems there is an issue
with the Else statement.
Public Function FinalStartMonth(UStartMonth As String, OStartMonth As
String, Updated As Boolean) As String
'Determine Final Start Month for each deduction
Select Case Updated
Case Is = True
FinalStartMonth = UStartMonth
Case Else
FinalStartMonth = OStartMonth
End Select
End Function
UpdatedStartMonth, if it is No, I would like the OriginalStartMonth. I
designed an If/Then/Else statement but it was returning an #Error if Updated
was No. So I changed it to Case, just to see if it would work. Again, #Error
if Updated was No. I switched the criteria around so that if the field is No,
return OriginalStartMonth, etc. This returned values only if the field wasn't
Updated and returned #Error if Updated was Yes. It seems there is an issue
with the Else statement.
Public Function FinalStartMonth(UStartMonth As String, OStartMonth As
String, Updated As Boolean) As String
'Determine Final Start Month for each deduction
Select Case Updated
Case Is = True
FinalStartMonth = UStartMonth
Case Else
FinalStartMonth = OStartMonth
End Select
End Function