Select option in Drupal form API
Your lacking some code.

Try changing your code above with:

 $query_bank = db_select('bank', 't1',array('target' =&gt; 'import')); 
 $result = $query_bank
   -&gt;fields('t1',array('bankID','bankname'))                                   
   -&gt;execute(); 

 foreach($result as $value){
      *$options_bank[$value-&gt;bankID] = t($value-&gt;bankname);
 }


The import keyword above is your database settings. It must be declared in your settings.php. Assuming  you are using an external database where your bank  table is located, It must look like the code below:

$databases = array (
    'default' =&gt; 
        array (
            'default' =&gt; 
                array (
                    'database' =&gt; 'Name of Your Drupal Database',
                    'username' =&gt; 'Username of Your Drupal Database',
                    'password' =&gt; 'Password of your Drupal Database',
                    'host' =&gt; 'Host of Your Drupal Database',
                    'port' =&gt; '',
                    'driver' =&gt; 'Driver of Your Drupal Databas', //It can be mysql/pgsql depends whether you are using Postgres or Mysql
                    'prefix' =&gt; '',
                ),
            'import' =&gt;  // This Part is where your database that contains `bank` table should be declared.
                array (
                    'database' =&gt; '',   //Fill it up according to your database settings.
                    'username' =&gt; '',
                    'password' =&gt; '',
                    'host' =&gt; '',
                    'port' =&gt; '',
                    'driver' =&gt; '',
                    'prefix' =&gt; '',
                ),
       ),
);


For more clarification, please refer to this link.