Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set a RecordSet, then closing it

Status
Not open for further replies.

bostonfrog

Programmer
Jul 14, 2003
79
MX
In the general declaration of my form I
Code:
Dim Rs as DAO.Recordset
. In the form's load event, I
Code:
Set Rs = Me.RecordSetClone
Why do I get an error message in the form's close event that an object variable is not set, when I put the following code into the form's close event:

Code:
Set rs = Nothing
rs.close

Isn't the value of the variable "rs" already stored after the form was loaded into memory? Thanks.
-- Michel
 
you wrote that you do the following on the Close Event of the form:

Set rs = Nothing
rs.close


your problem is you cant set the object to nothing and then call one of its methods. you should call the close method first and then set it to nothing.

hope that helps.
 
Ok, Thanks TPetersonFlorida. I will recode it and hope it solves the problem.
-- Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top