Brian,

First your difficulties with indenting may be my fault. Unconventional as I am I always use two spaces as my indent and never use tabs in my code. I'm 52 years old and don't imagine I will change.

While Jason may feel he lacks experience with content controls there is no lack of knowledge or experience with writing structured code. I defer to his suggestions in all cases.

That said, it has been difficult to assist you properly because you continue to move the goal post after the start of the game. I understand that this is not intentional, but hardly nothing I have offered so far looks like what I would probably have offered had I known your true objectives at the start of the game.

Unlike Jason who seems to view your project with a broader scope and offered outstanding advice, I have simply tried to answer your questions one at a time. I think this may have contributed to some of your difficulties. For example you first asked me (in another thread I think) how to reset all CCs to placeholder text state. That resulted to the ClearFields code in your project. While not discussed here (or at least I don't think so). We now know that objective really isn't necessary because if you use a template instead of an old document to create your new forms the CCs will be showing placeholder text anyway.

We exanded that reset all CCs in a table to all CCs in all tables. In truth we just needed to reset all CCs in the document. That was a tree in the forest that Jason identified while we were looking at a different tree.

Your newest objective not to flag longname2, 3 and shortname if longname 1 makes me wonder again just what it is that you are really trying to do!!

What is longname2 and longname 3? Looking at your form (really looking at it for the first time) it seems that longname2 and longname3 are just extentions of longname1 (i.e., line 2 and line 3). If this is the case then why aren't you using the allow carriage returns property of the longname1 content control?

If that is not the case then please explain what longname2 and 3 are. If you don't care if they are flagged if longname1 has text then why do you care if they are flagged at all? Flags in the sense you first applied them to me means "You must enter text here." If I am led to believe that I must do this (fill in longname2) and that I must to that (fill in longname3) and then after doing so I learn that if I had simply filled in longname1 that I really didn't have to do either then I am going to say "You wasted my time."

I know that you have put a lot of work into this form and that you have learned alot. I hope you've learned that while CCs are neat and there are neat things that can be done with them, they get very complicated very fast if you start trying to do anything more that enter text.

Good luck.