Haytham...
I am not sure why it's giving you a compile error...I typed the code in my first reply although I hadn't tested it at that time...I have used it in the past...I just cut and pasted the above code into an unbound field, changed the [YourField] part and, it worked fine on mine... I am...