well i got around the previous issue...now i am able to get the data. the record count is still -1 but as
joefawcett said, i guess its not always popualted or something. now the new issue is i am trying to get data into the spreadsheet activex object inside the access form. but my date fields in the db are displayed as some number in the form. i tried to find something like spreadsheet1.column(2).datatype = Date; or something. but i am still looking

why is that there is not much help from MS on these things like you have the oracle documentation..which got anything and everything at one place.
my code is as below --
function selectDropdown2(){
var dropdownValue=document.getElementById("DropdownLis t1").value;
Spreadsheet1.Cells.ClearContents();
??? Spreadsheet1.Columns. ?????
document.getElementById("Label2").innerText = "";
adOpenForwardOnly = 0;
adLockReadOnly = 1;
adCmdText = 1;
var myConnect = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\\temp\\envstat.mdb";
var ConnectObj = new ActiveXObject("ADODB.Connection");
ConnectObj.Open(myConnect);
var rs = new ActiveXObject("ADODB.Recordset");
var sql = "SELECT * FROM env_proj_alloc_stat WHERE project_name = '" + dropdownValue + "';";
rs.Open(sql, ConnectObj, adOpenForwardOnly, adLockReadOnly, adCmdText);
var recordCount = rs.RecordCount;
var fieldcount = rs.Fields.Count;
if(!rs.bof) {
rs.MoveFirst();
var x = 0;
while(!rs.eof) {
x = x+1;
//------------------the below works but commented for now--------
//for (var y=0;y < fieldcount;y++){
//Spreadsheet1.Cells(x, y+1).Value = rs.Fields.Item(y);
//}
//------------------------------------------------------------------
//------------------the below date stuff is not working-----
var d1 = new date();
d1 = rs.Fields.Item(2);
document.getElementById("Label2").innerText = "start date --" + d1;
//--------------------------
Spreadsheet1.Cells(x, 1).Value = rs.Fields.Item(0);
Spreadsheet1.Cells(x, 2).Value = rs.Fields.Item(1);
Spreadsheet1.Cells(x, 3).Value = rs.Fields.Item(2);
Spreadsheet1.Cells(x, 4).Value = rs.Fields.Item(3);
Spreadsheet1.Cells(x, 5).Value = rs.Fields.Item(4);
rs.MoveNext();
}
}
else {
document.getElementById("Label2").innerText = "No data found";
};
rs.Close();
ConnectObj.Close();
}