I have created a script to find out if there are any records with a particular Find Criteria, when there are records that match it works find and takes me to the List view etc. But if there are no matching records to the Find it keeps coming up with the FM Error pop up "No records match this find criteria - Cance - Continue - Modify Find" I have set up and error capture and followed instructions on a video form John Osborne but still it keeps showing me this pop up and not the one I set up to say "no records" and take me back to my Menu window. Not sure where else the issue could be. My script is as per below:
Set Error Capture [On]
Go to layout ["Production_List" (PRODUCTION)]
Perform Find [Restore]
If [Get (LastError) = 401]
Go to Layout ["Menu" ()]
Show Custom Dialog ["Error"; "There are no items to be shown"]
Enter Browse Mode 
Sort Records [Restore; No dialog]
Adjust Window [Resize to Fit]
Any help would be appreciated.
Yes, well I think this is one of those DOHHH moments..... Script does work...... might help if I actually attach script to correct button on correct Menu page.....