I want to compare two dates in Vba with Boolean operators. How to do it? One is coming from a text box control of my form. Other I put as a value. I tried-
MyBoolControl = NZ(myTxtcontrol, Year(#1/1/1901#)) <> Year(#1/1/1901#)
But it's not working. Also tried Format but in vain.