I want to show a blank if a date equals 01/01/2099. Here is the code I have now, but I am getting an error saying a date time is required here and it highlights the last line of the code, but if I put a date time at the end then it says string requierd here. What is wrong with the end of the code?
If "$" + {ACH.Amount} = {@currentACH} And {ACH.Starting} < CurrentDate And {ACH.Ending} > CurrentDate Then
{ACH.Ending}
Else If "$" + {ACH.Amount} = {@currentACH} And {ACH.Starting} < CurrentDate And {ACH.Ending} = Date(2099,01,01) Then
""
Else If "$" + {ACH.Amount1} = {@currentACH} And {ACH.Starting1} < CurrentDate And {ACH.Ending1} > CurrentDate Then
{ACH.Ending1}
Else If "$" + {ACH.Amount1} = {@currentACH} And {ACH.Starting1} < CurrentDate And {ACH.Ending1} = Date(2099,01,01) Then
""
Else If "$" + {ACH.Amount2} = {@currentACH} And {ACH.Starting2} < CurrentDate And {ACH.Ending2} > CurrentDate Then
{ACH.Ending2}
Else If "$" + {ACH.Amount2} = {@currentACH} And {ACH.Starting2} < CurrentDate And {ACH.Ending2} = Date(2099,01,01) Then
""
Else If "$" + {ACH.Amount3} = {@currentACH} And {ACH.Starting3} < CurrentDate And {ACH.Ending3} > CurrentDate Then
{ACH.Ending3}
Else If "$" + {ACH.Amount3} = {@currentACH} And {ACH.Starting3} < CurrentDate And {ACH.Ending3} = Date(2099,01,01) Then
""
Else If "$" + {ACH.Amount4} = {@currentACH} And {ACH.Starting4} < CurrentDate And {ACH.Ending4} > CurrentDate Then
{ACH.Ending4}
Else If "$" + {ACH.Amount4} = {@currentACH} And {ACH.Starting4} < CurrentDate And {ACH.Ending4} = Date(2099,01,01) Then
""
note: I am using Crystal syntax.