Setting Values for TableSelect checkboxes
You just need to add your id as the key for each item in your $rows array, e.g.:

foreach ($dbresult as $dbrow) {
  $rows[$dbrow-&gt;id] = array(
    $dbrow-&gt;firstname,
    $dbrow-&gt;lastname,
  );
}


Then in your submit handler run:

// Limit the checkbox ids to only those selected by the user
$selected = array_filter($form_state['values']['checkboxes']);

db_delete('autoleads')
  -&gt;condition('id', $selected, 'IN')
  -&gt;execute();


And you should be good to go :)

There's no need to use #default_value unless you want to pre-select some of the checkboxes for the user. If you do, just set #default_value to an array of the ids that you want selected initially.