when I try to run a "SELECT * FROM Contracet WHERE phone='phone'" or any call that would pick the las row in the DB givs me the error

Warning: find1(): PropGet() failed: Exception occurred. Source: ADODB.Field Description: Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. in H:\Documents and Settings\Don\Desktop\projects\form.php on line 179

and the line number iseny where i call

name changing for each veriable

any i deas on how to prevent this


here is the code
PHP Code:
function find1 ($form) {
$db_connection = new COM("ADODB.Connection");
$db_connstr "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" realpath("./ssatellite.mdb") . " ;DefaultDir=" realpath("./");
$sql "";
    foreach (
$form as $k => $v) {
        if (
$v != ""){
            if (
$k == "Customer_Name" || $k == "Phone") {
$sql .= "$k='$v'";
$rs $db_connection->execute("SELECT * FROM Contracts WHERE $sql");
$rs_ID    $rs->Fields(ID);
$rs_Date_1    $rs->Fields(Date_1);
$rs_Date_2    $rs->Fields(Date_2);
$rs_Date_3    $rs->Fields(Date_3);
$rs_Agent    $rs->Fields(Agent);
$rs_Source    $rs->Fields(Source);
$rs_in_Date_1    $rs->Fields(in_Date_1);
$rs_in_Date_2    $rs->Fields(in_Date_2);
$rs_in_Date_3    $rs->Fields(in_Date_3);
$rs_Day    $rs->Fields(Day);
$rs_DAY_AM_PM    $rs->Fields(DAY_AM_PM);
$rs_Customer_Name    $rs->Fields(Customer_Name);
$rs_Address    $rs->Fields(Address);
$rs_City    $rs->Fields(City);
$rs_State    $rs->Fields(State);
$rs_Zip    $rs->Fields(Zip);
$rs_Bill_to    $rs->Fields(Bill_to);
$rs_Phone    $rs->Fields(Phone);
$rs_Cell    $rs->Fields(Cell);
$rs_Work    $rs->Fields(Work);
$rs_Billing    $rs->Fields(Billing);
$rs_CC_Number    $rs->Fields(CC_Number);
$rs_SS_Number    $rs->Fields(SS_Number);
$rs_Receiver_Serial_1    $rs->Fields(Receiver_Serial_1);
$rs_Smart_Card_1    $rs->Fields(Smart_Card_1);
$rs_Receiver_Serial_2    $rs->Fields(Receiver_Serial_2);
$rs_Smart_Card_2    $rs->Fields(Smart_Card_2);
$rs_Num_Receiver    $rs->Fields(Num_Receiver);
$rs_Promotion    $rs->Fields(Promotion);
$rs_Equipment    $rs->Fields(Equipment);
$rs_Equipment_1    $rs->Fields(Equipment_1);
$rs_Equipment_2    $rs->Fields(Equipment_2);
$rs_Accessories    $rs->Fields(Accessories);
$rs_Accessories_1    $rs->Fields(Accessories_1);
$rs_Accessories_2    $rs->Fields(Accessories_2);
$rs_Installation_Notes    $rs->Fields(Installation_Notes);
$rs_Installation_Notes_1    $rs->Fields(Installation_Notes_1);
$rs_Installation_Notes_2    $rs->Fields(Installation_Notes_2);
$rs_tax    $rs->Fields(tax);
$rs_total    $rs->Fields(total);

<form name="Main" method="post" action="<?= $_SERVER['PHP_SELF']; ?>">
  <table width="750" border="0" align="center">
      <td colspan="6" align="center"> <h1>System Satellite</h1></td>
      <td colspan="6" align="center"> <h2>1-888-634-8327</h2></td>
      <td width="284">Date:
        <input value="<?= $rs_Date_1->Value?>" name="Date_1" type="text" size="1">
        / <input value="<?= $rs_Date_1->Value?>" name="Date_2" type="text" size="1">
        / <input value="<?= $rs_Date_1->Value?>" name="Date_3" type="text" size="1"></td>
      <td colspan="2">Agent: <input value="<?= $rs_Agent->Value?>" type="text" name="Agent"></td>