Thank you,
I figured it out. The help file in my software states do not type the "if" statement use the programing toolbar button. I did this and the "if" was preceeded by a placeholder, which was irremovable causing an error. Anyway, I finally decided to type the "if" and it worked fine. Thank you for the reply.
John