Better scripting is to set fields rather than insert. And it is a good habit to set error capture around your Perform find and you can then test for finding nothing so that you can do something else if no records are found instead of getting an error prompt. But the main answer you had above from fmdude should take care of your Find problem using the equals.
Go to Layout ("Name Check")
Set Variable [ $LastVisited ; Table::Surname ]
Enter Find Mode
Set Field [ (Table::Surname) ; "==" & $LastVisited ]
Set Field [ (Table::Patient Released) ; "No" ]
Set Error Capture [On]
Set Error Capture [Off]