Tim said:
I have a db on a file server that seems to remain
permanently open, even though no-one is on the system. I
suspect a corruption in the LDB.
Has anyone any ideas?
Have you split the database? Are you running a single copy of the database
from the server and letting more than one person connect to it?
If so, you have 2 problems, the first being the cause, the second a
compounding of the effect. If not, ignore the rest of this answer and do
what the earlier posters have suggested, namely delete the LDB file.
In spite of what network admins seem to think, an Access file in not just
like any other file, and if it is treated like one, it will eventually
corrupt. The blame is then on the network, not on Access which has it's own
problems to deal with. ALL network databases, without exception, should be
split, with the front-end residing on the workstations, NOT on the server.
As far as an Access file which will never close, there are 2 possible
causes, both of which happen in the front-end (code) part of the database.
1. All recordsets which are opened must be closed and set to nothing. That
is good coding practice anyway, but is important in Access as VB does not
always clean up after itself when recordset variables run out of scope. This
is typical syntax:
rst.Close
Set rst = Nothing
Set db = Nothing
2. There is a bug in some versions of Access which is fix by explicit
setting of boolean form variables. Instead of:
If Me.chkBoxName Then
' Do Something
End If
use:
If Me.chkBoxName = True Then
or:
If Me.chkBoxName.Value Then
I prefer the first example since also it makes for much clearer coding.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access