MS Access remains loaded after closing app


A

Antonio

Does anyone know a fix for this? When I close MS Access,
it remains loaded, so if I try to re-open it, it created
the .ldb file, but the app won't open. I have to go into
Task Manager, end the MS Access, and then open it again.
Thanks, Antonio
 
R

RobFMS

Antonio

Do you open Recordsets in your application? Are you closing them properly
when you are done? In some cases, this may cause your application not to
close.


--

Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Problems with your database? Need to upgrade your application?
Contact the FMS Professional Solutions Group: www.fmsinc.com/consulting

Need a Book Recommendation?
www.fmsinc.com/toplevel/books.htm

Need software tools for Access, VB or .NET?
http://www.fmsinc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Ad

Advertisements

A

Antonio

Rob, I have some coding that loops through the recordset
to find and display specific data. e.g. I have a button
that when clicked displays all the e-mail addresses of all
the customers. Is that what you mean? if so, how can I
terminate it?
Thanks, Antonio
 
V

Van T. Dinh

Anywhere you open a Recordset rs, you should use the statements:

rs.Close
Set rs = Nothing

when you finish using it in your code.
 
A

Antonio

Yes, I have all the rs=nothing in all the forms I use the
recordset. Any other ideas?

Thanks,
Antonio
 
Ad

Advertisements

D

Dirk Goldgar

Antonio said:
Yes, I have all the rs=nothing in all the forms I use the
recordset. Any other ideas?
Depending on what version and SP level of Access you're using, you may
be encountering the "boolean object reference bug". If you have code
that tests for the truth of a boolean-valued object such as a checkbox,
don't do it like this:

If Me!MyCheckBoxName Then

Instead, use any of these forms:

If (Me!MyCheckBoxName) Then

If Me!MyCheckBoxName = True Then

If Me!MyCheckBoxName.Value Then

I think this bug may have been fixed by now, but I don't trust it.

Another possibility is that you have a global object variable that
hasn't been set to Nothing. For example, if for convenience you declare
a Database object in the Declarations section of a standard module, and
have code that sets it to CurrentDb(), then you won't be able to close
Access until you set it to Nothing.
 

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