I don't see anything syntactically wrong with this. The problem appears to be that you're checking the field you are entering. Essentially, you're script is saying, "If this field I just entered is empty, then I want to make it read only."
If you're not absolutely set on the idea of making the field read only, you could instead set focus to one of the fields that needs to be filled.
Try this for the enter event of your field that you want to protect when the other two aren't filled.
if (TextField2.isNull) {
xfa.host.messageBox("You missed a spot");
xfa.host.setFocus("TextField2");
} else if (TextField3.isNull) {
xfa.host.messageBox("You missed a spot");
xfa.host.setFocus("TextField3");
}
(Of course, change the names of TextField2 and 3 to match what your field names, and change the message to be more meaningful. ) Now, this doesn't make that field readOnly, but you can't do anything with it unless those fields are filled. If you only need one or the other to be filled, you could change the logic slightly by adding an if statement that surrounds this to check that they are both empty before proceeding.