Cannot close Access - recordset problem?

  • Thread starter Thread starter David Zeidman
  • Start date Start date
D

David Zeidman

I have an access application that consists of one main form. On
loading up the form I check to see if a certain length of time has
past since I last opened the form. If it has then I proceed to step
through all the records on the form and update them.

I open a recordset using the form's recordsetclone method and am
careful to close it and set it to nothing. I have looked at the rest
of my code and whereever I open a recordset I make sure that I close
it again.

However when I shut access down the main access window remains open.

I have read on this group about boolean controls being a problem but I
don't have any on my form.

I did notice that on doing the recordsetclone method an instance of
the form gets opened (at least the onOpen event is called) - could
there be "hidden" references there?

Any help is really appreciated.

David
 
David Zeidman said:
I have an access application that consists of one main form. On
loading up the form I check to see if a certain length of time has
past since I last opened the form. If it has then I proceed to step
through all the records on the form and update them.

I open a recordset using the form's recordsetclone method and am
careful to close it and set it to nothing. I have looked at the rest
of my code and whereever I open a recordset I make sure that I close
it again.

However when I shut access down the main access window remains open.

I have read on this group about boolean controls being a problem but I
don't have any on my form.

I did notice that on doing the recordsetclone method an instance of
the form gets opened (at least the onOpen event is called) - could
there be "hidden" references there?

Any help is really appreciated.

David

I think you'd better post your code. It's practically impossible to
guess where the error is without seeing it, and there may even be a more
efficient way to do your update than by stepping through the
recordsetclone.
 
I am not entirely sure I know what a switchboard is but I do have a
hidden form (with nothing in it only some onUnload code that tries to
close of the recordsets in the DB and set their references to
Nothing). When I add this to the hidden form it doesn't help.
 
David Zeidman said:
I am not entirely sure I know what a switchboard is but I do have a
hidden form (with nothing in it only some onUnload code that tries to
close of the recordsets in the DB and set their references to
Nothing). When I add this to the hidden form it doesn't help.

Can you verify which section of code is causing the problem? You
mentioned code in the main form in your first message, but it's also
conceivable that this "unload" code in the hidden form may be at fault.
If everything was working until you changed one of these forms, that's
likely to be the cause and you should post the code you changed.
 
Back
Top