Use form-submit to display results table on page I’m struggling with how to get a form-submit to return the results of a database select-query.   I can build the form and the submit-function does the select-query to collect the results and builds a render-array:

$table = array(
    '#theme' =&gt; 'table',
    '#header' =&gt; array(t($field_1), t($field_2)),
    '#rows' =&gt; $tableRowS,
);


However I can’t figure out how to get drupal to render this table instead of just rebuilding and showing the empty form again. I’ve examined the concept of redirect but don’t see a way of passing the table to the redirected page.

Any help would be appreciated.
I don't think you can return a themed table on form submit. Instead, what I suggest is to use $_SESSION variable to store the form field values to query the database and redirect to a URL. In the callback function of the URL query the database and return the themed page.

Example: 

function mymodule_myform_submit($form, $form_state){
   $_SESSION['somevar'] = $form_state['values']['somefield'];
   drupal_goto('someurl');
}


And in the URL callback function get the value of the session variable $somevar = $_SESSION['somevar'];