Perhaps its a typo, but your example script never actually perfomrs the find, remaining in find mode.
Go to Layout [ “search_layout” ]
Enter Find Mode[ Pause ]
Set Error Capture [ On ]
Perform Find 
Set Field [ PSC_ECO::gErrorCaptureField; Get (LastError) ]
If [ PSC_ECO::gErrorCaptureField = 401 ]
Show Custom Dialog ["Not Found"; "This ECO does not exist. Are you sure your entries are correct?"]
Go to Layout [ “PSC_ECO” ]
Should work, but 401 is not the only error that can be returned by Perform Find. Leaving all fields blank, for example returns a different error code. You may want to check for any error code returned except 0 or you may want to use Get ( FoundCount ) to test to see if performing the find pulled up any records or not.
Leaving the "Perform Find " out was not a typo, but ignorance :) I constructed a few databases a few years ago. Then have not touched any for four years. I am discovering that I forgot most of what little I knew...
I like your suggestion about using "Get (FoundCount)". I'll try to use it and see if I can make it work.