Yes, I fully agree with you, just after reading your reply, I got the missing point and I managed to resolve it. it's about the If statement that I'm using. I have removed it, and as I'm calling the function in the after update event this will ensure that dtmDate value will never equal Null or...