Noticed that the values in the order-by control were based on the original fields in the line that's always visible for each record. Updated that to reconcile with current fields in that line. Had to update the order-by table in the db and update the switch($order_by_1_text) statement in search.php.