ActiveConnection and Recordsets

B

Brian

I am having difficulty Access 2000 on XP. I have an ADP
with a form that is used for data entry. When a button is
clicked, the information in the textboxes is used to
insert new rows into the SQL Server DB with a stored
procedure called by a Command object. I open a separate
Recordset object with a Command object that queries all
the entries made that are related to the main record of
the form. The Recordset is set to the Recordset property
of a List Box control used to display the values in the
Recordset. At the end of the Click() sub, I close the
Connection (which uses the
CurrentProject.ActiveConnection) and Recordset objects and
set all the objects to Nothing. The first time the button
is clicked everything works ok. The next time the button
is clicked and the Sub gets to the point where the insert
Command object executes, Access locks up and closes. If I
comment out the part that sets the List Box Recordset
property, it works ok. It seems as if there is a
connection that is remaining open, but I can't figure out
what it is. Any thoughts would be greatly appreciated.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top