thanks Gord, I tested your code. It does not work, I am passing the dob as parameter and I tried exactly what you suggested. If I put me in front of it, I get an syntax error and without it does not display the message. It does work when you have on a form, but I am testing the value that is on a table, I passed the value as parameter, is there any othe way. thank you Gord, I am been trying for days now different combinations and it does not seem to work. any other suggestinos. I really appreciate it .