[b][red]This message was edited by extor at 2004-10-25 19:15:35[/red][/b][hr]
[b][red]This message was edited by extor at 2004-10-25 8:36:19[/red][/b][hr]
I need help on Access 2002!!!!!
I have a simple code to adds index to a table if the index is not set. It works ok when I run it from my pc( database on my c drive), but when I try to run it from a network drive I'm getting the error below:
Runtime error -214721785(80040e40):
The database engine could not lock table 'Combined Table' because it is already in use by another person or process.
There's no other person using the database.. so, I'm the only one using it when I received the error msg. See the code at the end..
Private Sub SetIndex()
Dim Cat As ADOX.Catalog
Dim Tabl As ADOX.Table
Dim Indx As ADOX.Index
Set Cat = New ADOX.Catalog
Set Tabl = New ADOX.Table
Set Indx = New ADOX.Index
Cat.ActiveConnection = CurrentProject.Connection
Set Tabl = Cat.Tables("Combined Table")
If Tabl.Indexes.Count > 0 Then
Indx.Name = "Myf"