And what does your script do besides display the dialog. I'd guess that you need to add these steps to move the focus out of the field so that the script doesn't trip its own script trigger:
Go to Field or Go to Object Here to put focus someplace "safe".
Exist Script [False] --> cancels the "enter" event so that focus is not left in the "locked" field.
But you might want to consider an alternate approach that does not need any scripting:
See "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a description of how to set this up.
Thanks Philmodjunk, I've realised what I've done because following advice from somewhere else on a forum I unthinkingly put in script to move to next field at the end. As there were only the two field I wanted to protect and the two relevant lock fields on the layout I'd created, there was nowhere else for it to go but back to the first field I wanted protected and thus tripping it's own script trigger!!. Your advice of moving into somewhere safe makes sense and is necessary as otherwise it reverts to the field and although it won't allow new data to be entered it does allow the cursor to be moved backwards so deleting the existing data.
Thanks again for your quick assistance. In answer to your question I've been using Filemaker products since Version 2 years ago but only occasionally as an adjunct to my normal work.