lock file problem

N

Nick

The .ldb lock file does not always release/delete when the
last/only user closes my Access2000 application using a
command button doing a DoCmd.Quit or Application.Quit.
Not a problem if user closes via the Close button(X) on
the form.
Thanks for any info.
 
A

Allen Browne

Nick, is there anything you could to to help Access release everything?

If it's a bound form, try explicitly saving the record:
If Me.Dirty Then
Me.Dirty = False
End If

In any of your code, close anything you open and, set all objects to
nothing, e.g.:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim frm As Form
Set frm = Forms!MyForm
Set db = dbEngine(0)(0) 'This was already open
Set rs = OpenRecordset(... 'You opened this
'Useful code in here
rs.Close 'Close what you opened
Set rs = Nothing
Set db = Nothing 'rs depends on db, so do db afterwards.
Set frm = Nothing

You may also want to check at support.microsoft.com to see if there is an
update for your version of Office, or for JET.
 

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