elmpine Posted June 17, 2008 Share Posted June 17, 2008 Greetings all I am having difficulties in a calculated validation for a field. There are 3 fields involved Receipt_Date (Date) Return_Due (Date) Consignment (Text - Yes/No) If a receipt of goods is a consignment, (Consignment = "Yes") then the Return_Due date must be after the Receipt_Date. If a receipt of goods is not a consignment then the return_Due must be blank I have defined Return_Due as: Auotenter calculated value: If ( Consignment = "Yes" ;Receipt Date + 90;"" ) Do Not replace (unchecked) Validation by calculation: If ( Consignment = "Yes" ; Return_Due > Receipt_Date ; "" ) This works if the receipt is a consigment but fails (error message) if Consignment = "No" Any ideas ? elmpine Link to comment Share on other sites More sharing options...
elmpine Posted June 17, 2008 Author Share Posted June 17, 2008 It's Ok you can all rest now smiley-laughing I've solved it: The validation by calculation needs to be: If ( Consignment = "Yes" ; Return_Due > Receipt_Date ; 1 ) Why a null value ("") is equivalent to 1, I don't know but it works. elmpine Link to comment Share on other sites More sharing options...
aaa Posted June 17, 2008 Share Posted June 17, 2008 Hi, elmpine. Not solved enough. Try Consignment="no",Receipt_date=05/05/08 and Return_Due=05/05/09 At this case Returne_Due must be empty i think. Link to comment Share on other sites More sharing options...
elmpine Posted June 17, 2008 Author Share Posted June 17, 2008 aaa, when consignment is set to "no", the next field in the tab order is is return_due. The Auto-enter calculated value then changes it to null : If ( Consignment = "Yes" ;Receipt Date + 90;"" ) Do Not replace (unchecked) Cheers elmpine Link to comment Share on other sites More sharing options...
aaa Posted June 17, 2008 Share Posted June 17, 2008 Let cosignment="no". Try insert 05/05/09 to return_due. In your solution it is possible. But i think it must be not possible. It must be change to blank automaticaly. Link to comment Share on other sites More sharing options...
aaa Posted June 17, 2008 Share Posted June 17, 2008 Look here. Link to comment Share on other sites More sharing options...
Recommended Posts