Could not lock file

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I am experiencing a lot of trouble with this error
"Could not lock file"

Access 2000, Ado 2.8

Basically what i am doing is opening and closing a connection to a database
50.
When i have to instances of the application running then there is no
problem, as soon as i start a third instance then the error occurs.

I know MS says no more than 20 users for Access but this is just 3 and it
bombs, any ideas.

Code to open and close db connections

On Error GoTo errStuffed

lblStart.Caption = "Start: " & Now

Dim lngCount As Long, sConnString As String, Conn As ADODB.Connection

lngCount = 1

Do Until lngCount = txtTime1.Text + 1

Set Conn = New ADODB.Connection
With Conn
.ConnectionString = "Data Source=" &
gclsSystem.DBFileNames.gsDBs1sdf & ";"
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Password").Value = "*****"
.Properties("User ID").Value = "******"
.Properties("Jet OLEDB:System database").Value =
gclsSystem.DBFileNames.gsDBSystem
.Mode = adModeShareDenyNone
.Open
End With

lblStatus1.Caption = "Open " & lngCount

Conn.Close
Set Conn = Nothing

lblStatus1.Caption = "Closed " & lngCount
DoEvents

lngCount = lngCount + 1

Loop

lblEnd.Caption = "End: " & Now

MsgBox "DONE"
.