In the recordset use the advanced editor and add another condition to the where clause:
AND (lastname LIKE paramLetter OR -1 = paramLetter2)
in the variables section, create 2 new variables as:
name: paramLetter
type: Begins with text
default value: -1
run time value: <?php echo(isset($_GET['letter'])?$_GET['letter']:""); ?>
name: paramLetter2
type: integer
default value: -1
run time value: <?php echo(isset($_GET['letter'])?$_GET['letter']:""); ?>
as for the code that needs to be removed from the page, you need to remove any code that relates to the old recordset.