I initially was just closing the form I expected to be active. I then
realized I should make sure all are closed, so I created:
Public Function ClsForms()
Dim i As Integer
For i = Forms.Count - 1 To 0 Step -1
DoCmd.Close acForm, Forms(i).Name
Next
Connection.Close
End Function
If I watch the directory that the ldb file is in as I manually close forms,
I see it disappear. When I use code to close, it's still there.
"Douglas J. Steele" wrote:
> How are you closing the forms? It shouldn't matter whether you're closing
> them programmatically or manually.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
>
> "OregonIzer" <(E-Mail Removed)> wrote in message
> news:0B47789F-69BE-45ED-89B4-(E-Mail Removed)...
> >I "borrowed" a subroutine that I found in this group to create a backup of
> >my
> > backend. (Thanks Ken Snell). Before it runs a backup it checks for a
> > locking
> > file to make sure that no one else is in the system. This works fine if I
> > manually close any open forms before I try to run the subroutine. But if I
> > close forms in vba as part of my function it leaves the locking file and
> > 'believes' someone else is in the system. Can someone tell me how to get
> > rid
> > of the .ldb file.
>
>
>