No exclusive access to database -- on a local drive???

Clueless Newbie

Immortal. So far.
Local time
Tomorrow, 00:35
Joined
Feb 6, 2004
Messages
48
Hi once again! :)

I've just taken over a project from a colleague and have already encountered a strange problem: When I try to open a form in editing mode, I almost always get a message that I don't have exclusive access to the database (everything's stored on a local drive, mind you), so any changes I make may not be saved in the end - which indeed turns out to be the case.

When in debug mode, Access immediately jumps to the following function:

Private Function SubGruppeAbgleich() As Long
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("Gruppen")
rs.FindFirst ("Gruppe='Abgleich'")
If rs.NoMatch Then
rs.AddNew
rs!Gruppe = "Abgleich"
SubGruppeAbgleich = rs!ID
rs.Update
Else
SubGruppeAbgleich = rs!ID
End If

End Function

Which looks fine to me, so far... :confused:

That being said, I also need to point out that this doesn't always happen. Sometimes, everything works just fine; but I have to open, close and re-open my database several times for that to finally happen. Toying with my general Access settings (i.e. setting the standard opening mode to "exclusively") hasn't made any difference whatsoever, I'm afraid.

What's wrong with that database or with my settings? What should I be looking out for? This stuff is costing me so much time... :rolleyes:

Any help would be greatly appreciated. Thank you! :)

Ute
 
1. The privilege of opening any Access database exclusively is a workgroup function. In the Tools>>Security>>User and Account Permissions you can find a nice dialog box that includes several object types, including the database itself. You need to be sure that your account has Open Exclusive checked.

2. If the database is local to your machine but still shared by others (because your machine has a SHARE open), you will still have the chance that an .LDB file is open. If you opened (rather than had to create) the .LDB then you weren't the only person in the DB as far as Access is concerned. I.e. you automatically aren't exclusive. If the database is NOT exposed on a SHARE folder, then check for the existence of a .LDB file while the DB is NOT open. If a .LDB exists for that DB, delete it. THEN open the DB to do your exclusive thing, whatever it is.
 
Thank you! I'll try that a.s.a.p. and will let you know if it worked. :) (It's not a shared drive, so I'll give your first suggestion a shot first.)
 

Users who are viewing this thread

Back
Top Bottom