I am trying to use the following IF Statement for a date:
IF ("Posting Date" < 041508D) THEN BEGIN
IF ResCostTab.GET(ResGroup) THEN BEGIN
UCost := ResCostTab."Unit Cost";
TCost := UCost * Quantity;
END ELSE BEGIN
CLEAR(UCost);
CLEAR(TCost);
END;
END ELSE BEGIN
UCost := "Unit Cost";
TCost := "Total Cost";
END;
But I get the following error message:
"The expression Code cannot be type-converted to a Option value"
Could anybody pls help?
How to use IF statement for a date?
Thank you!
0
Answers
You are welcome.