this is whats baffling me, it seems to be a bug or version conflict in IE 5.5 and 6.0. My code works great on IE 5.0, and the code functions the way it should in 5.5, but it just runs every button click twice. Im posting one of my case statements for you all to look at. you get into this case statement by clicking on a button that opens this form and passes a Pagemode varialbe. but in IE 5.5 its as if it gets the page twice, the first time it runs through the code, and no order is present, it will create the order and add the item to the order table, and for what ever reason, (this is where the problem lies) it will run the code again, see that there is anorder for this session ID and add the item a second time in the orderid table. but again I must stress that this ONLY happens when using IE 5.5 or higher, if you run the page with IE 5.0 the code works great and only inserts the item once. any help would be appreciated. heres the code :
Case "order"
sql = "SELECT ProdId, ProdName, ProdNumber, CatId, ShortDesc, LongDesc, Price, Terminate, PictureFileName, PDFFile, ModDate FROM tblProd "
sql = sql & "WHERE prodid = "& varprodid & " AND Terminate = false"
rs.Open sql, conn, adOpenStatic, adLockReadOnly, adCmdText
varprice = rs("Price"

rs.Close
sql = "SELECT orderid, ordate, orderNum,userID,status,ModDate,terminate, orSessionid FROM tblOrder "
sql = sql & " WHERE orSessionId = '" & varSessionId & "'"
rs.Open sql, conn, adOpenStatic, adLockReadOnly, adCmdText
IF NOT(rs.EOF or rs.BOF)Then
sOrderNumber = rs("ordernum"

sql2 = "SELECT Prodid, price,orderid,qty FROM tblOrderID WHERE Prodid = '" & varProdId & "'"
rs2.Open sql2, conn, adOpenStatic, adLockPessimistic
rs2.Close
sOrderid = rs("orderid"

tblName = "tblOrderID"
rs2.Open tblName, conn, adOpenKeyset, adLockPessimistic, adCmdTable
rs2.AddNew
rs2.Fields("ProdID"

= varprodid
rs2.Fields("orderID"

= sOrderid
rs2.Fields("price"

= varPrice
rs2.Fields("qty"

= 1
rs2.Update
rs2.Close
rs.Close
else
rs.Close
sql = "SELECT orderid, ordate, orderNum,userID,status,ModDate,terminate, orSessionid FROM tblOrder"
tblName = "tblOrder"
rs.Open tblName, conn, adOpenKeyset, adLockPessimistic, adCmdTable
rs.AddNew
rs.Fields("orSessionid"

= varsessionid
rs.Fields("ordernum"

= sOrderNumber
rs.Fields("orDate"

= date()
rs.Fields("status"

= "UNORDERED"
rs.Update
sorderid = rs("orderid"
tblName = "tblOrderID"
rs2.Open tblName, conn, adOpenKeyset, adLockPessimistic, adCmdTable
rs2.AddNew
rs2.Fields("ProdID"

= varprodid
rs2.Fields("orderID"

= rs("orderid"

rs2.Fields("price"

= varPrice
rs2.Fields("qty"

= 1
rs2.Update
rs2.Close
rs.Close
end if