your error is on the vb handling side....
ADODB.Recordset error '800a0e78' Operation is not allowed when the object is closed. "
this error occurs if you refer to the recordset in vb code , but the recordset did not find any records, ie:
SQL="SELECT * FROM SOMETABLE WHERE X=" & somVBVariable
Set rs= Conn.Execute(SQL)
sometextbox.text=rs!SomeField
The above statement will raise the error above if the rs.EOF was true:
it should be: SQL="SELECT * FROM SOMETABLE WHERE X=" & somVBVariable
Set rs= Conn.Execute(SQL)
if not rs.eof then
sometextbox.text=rs!SomeField ' rs("SomeField").Value is the eqivilient syntax
end if
other similar error s will happen if the rs!SomeField was null, and you try to stick it directly into a variable or object property. (Invalid use of null for example);
you could also get this same error if you are using the following code:
SQL="SELECT * FROM SOMETABLE WHERE X=" & somVBVariable
Set rs.open SQL,Conn
if you did not first do a Set rs=New ADODB.Recordset prior ti the rs.Open command; using the Conn.Execute makes that step unnecessary.
Lowell