I'm developing an application that interfaces with a database to allow multiple users to select multiple items from an Access database using ADO DB. However, whenever there are multiple users I get a "Run-time Error 339: A File is missing or is invalid". This error happens whenever a form loads and the code for that for is:

VB Code:
  1. '*FORM_LOAD()******************************************************************
  2. 'NAME: Form_Load()
  3. 'DESC: Initially loads the listbox (lstFirstScreen) with the available data
  4. '      from the database
  5. Private Sub Form_Load()
  6.     cmdSelect.Enabled = False
  7.     lblTopTabs.Caption = "PICKSL" & "     " _
  8.                        & " DFC" & "           " _
  9.                        & "PROD" & "        " _
  10.                        & "DESC"
  11.    
  12.     cmdPrint.Visible = False
  13.     cmdPrint.Enabled = False
  14.    
  15.     Set connection = New ADODB.connection
  16.     connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  17.         "Data Source= G:\Finance\Inventory Control\CycleCount\DB\cycleCount.mdb"
  18.     connection.Open
  19.    
  20.     Set newConnection = New ADODB.connection
  21.     newConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  22.         "Data Source= G:\Finance\Inventory Control\CycleCount\DB\cycleCount.mdb"
  23.     newConnection.Open
  24.    
  25.     Set recordSet = New ADODB.recordSet
  26.     Set newRecordSet = New ADODB.recordSet
  27.      
  28.     Dim inAlterTable As Boolean
  29.     Dim selectStatement As String
  30.     Dim newSelectStatement As String
  31.    
  32.     selectStatement = "SELECT DISTINCT PICKSL,DFP,PROD,DESC FROM [MAIN]"
  33.     newSelectStatement = "SELECT * FROM [ALTER] WHERE TYPEOFCHANGE='SELECTED'"
  34.        
  35.     recordSet.Open selectStatement, connection, adOpenKeyset, adLockPessimistic, adCmdText
  36.     newRecordSet.Open newSelectStatement, newConnection, adOpenKeyset, adLockPessimistic, adCmdText
  37.    
  38.     recordSet.MoveFirst
  39.            
  40.     Do Until recordSet.EOF
  41.         If (newRecordSet.EOF <> True) Then
  42.             newRecordSet.MoveFirst
  43.         End If
  44.         inAlterTable = False
  45.         Do Until newRecordSet.EOF
  46.             If (recordSet.Fields("PICKSL") = newRecordSet.Fields("PICKSL") And _
  47.                 recordSet.Fields("DFP") = newRecordSet.Fields("DFP") And _
  48.                 recordSet.Fields("PROD") = newRecordSet.Fields("PROD") And _
  49.                 recordSet.Fields("DESC") = newRecordSet.Fields("DESC")) Then
  50.                 inAlterTable = True
  51.             End If
  52.             DoEvents
  53.             newRecordSet.MoveNext
  54.         Loop
  55.  
  56.         If (inAlterTable = False) Then
  57.             lstFirstScreen.AddItem (recordSet.Fields("PICKSL") & vbTab _
  58.                 & recordSet.Fields("DFP") & vbTab _
  59.                 & recordSet.Fields("PROD") & vbTab _
  60.                 & recordSet.Fields("Desc"))
  61.         End If
  62.         DoEvents
  63.                
  64.         recordSet.MoveNext
  65.     Loop
  66.    
  67.     recordSet.Close
  68.     connection.Close
  69.     Set recordSet = Nothing
  70.     Set connection = Nothing
  71.    
  72.     If (lstFirstScreen.ListCount > 0) Then
  73.         cmdSelect.Enabled = True
  74.     End If
  75.    
  76. End Sub
  77. '*ENDOF*FORM_LOAD()************************************************************

I do have a pessimistic lock on the database; could that be what is causing it. And if so I can I keep users from getting the same data at the same time? Any help you be greatly appreciated.