id not an index in this table

Hi there,

I developed a database for some users and one of the users has recently got the following message on opening:

'The document ASK_Database_v7_temp.accdb caused a serious error the last time it was opened. Would you like to continue opening it?' (options: yes or no)

When she clicked click yes - it reads 'id not an index in this table' - and the only way out of this is to go to task manager and close down.

Could anyone shed some light as to what this error might be?

Post your answer or comment

comments powered by Disqus

I have successfully made my database to track our staff's training and was inputting the information when this box appeared and said that - 'Id' is not an index in this table. At first it wouldn't load up my form but now it has loaded up.

Can anyone tell me what this means?

Everything has been woking fine for about 10 days so I don't know why it has said this now.

Help me please



I have a file somewhere that seems to be corrupted and I don't know what to do. "Id" is not an index in this table is the error message I'm getting.


This is the code i'm using, error line highlighted:

	Option Compare Database
Public Function VerifyAcct(AcctNum As String)
Dim dbDatabase As Database
Dim rsAcctNumber As Recordset
Set dbDatabase = CurrentDb
Set rsAcctNumber = dbDatabase.OpenRecordset("CAM_Portfolio_Query", dbOpenTable)
With rsAcctNumber
    .Index = "Account-Number"
    .Seek "=", AcctNum
    If .NoMatch = True Then
        MsgBox "NotFound"
        MsgBox "Found"
    End If
End With
End Function

It is giving me Runtime 3800, "FieldName" is not an index in this table.
In the table CAM_Portfolio_Query, I set the [Account-Number] field to be both the key and indexed, with no duplicates allowed.

Yet i still get this error. Any thoughts?


Last week my hard disk on my old machine corrupted…

It happened half way through entering information on a particular MSAccess 2000 database although I am assured that the failure of the database did not result in the failure of the disk.

The computer would no longer boot up and unfortunately we hadn't taken a ghost image of the disk or made a boot up disk.
In the end we managed to take the hard disk out of the machine - then using a small white pin on one of the disks rear ports change it to a slave by placing a small white plug in two of the vertical pins at the rear of the scsi port we then put it into a vacant port on another computer's scsi bus and got that computer to recognise the disk.

Once I managed to get the disk up and running I copied the file to the master disk and went about investigating whether I could get the database back.

With regards to the database the problem I got immediately prior to disk failure was
-'AO Index' is not an index in this table- and this was still the case when I could see the file again.

I tried compact and repair
I tried copy and pasting / renaming the database
I also tried importing tables from the corrupted database by using a fresh database.

None of these things worked.

Note initially I was getting a Cyclical Redundancy Check Error trying to paste the database from the old slave hard disk to the master disk however this seemed to disappear.

Eventually I set up an ODBC link and was able to export the data into an excel spreadsheet. Obviously all the forms / reports have been lost however this was a small personal database on which had been conducted little design. I also have a similar database into which I can place the information and it wil probably take me about a week to get the data back into a database.

All in all a good learning experience - our network databases are fully backed up and we would just go back to a historical copy if something happened to one of our Access applications. I did a search on the forum and only found one other thread on this - 'AO Index' is not an index in this table - so thought I'd post my experiences.

Would welcome any comments if people have a better understanding of the causes / solutions to this problem.


I got this "AOIndex is not an index in this table" error with Access 2000 after replicating a database and storing it in the same network folder. I am not able to open my database now, i am afraid 2days work on my forms is lost. I usually have backup, but the last backup i have is 2 days ago i have made alot of changes to 2 FORMS after that

Please anybody have suggestions on how to retrive my forms??? I am really concerned about the forms. I have backup for data and for the reports. Please help me?

I was working on my database the other day it was working fine and i saved my work so i can go for lunch. Then when i came back to my database and tried to open it, a message comes up saying 'ID is not an index of this table'. Is there a way to fix this problem?


So I have a split database. Front end is a .mdb file and backend is on a MySQL server.

Each user has a copy of the database saved locally. I have a local developer version that updates a "master" version stored on the network. The users' database then can update itself from that master version when need be.

However, the local copy on the users machine (not mine) has been getting (apparently) corrupted very quickly resulting in the given error.

All the articles I've seen say make a backup and to split your database and to ensure everyone is running a local copy. There is no data loss and the Master and developer versions of the DB remain uncorrupted.

I'm at a total loss as what to do. The user can edit data just fine until this corruption occurs and then needs to delete the local database and restore it with a copy of the master.

Any ideas? Even crazy ones...?


Hello, I keep getting this error when opening up a database. What can I check to find and fix the problem? TIA

I have an Access 2010 database with about 30 frontends all linking to the same backend. The frontends and backend are both located on my company's internal network. I've set all the frontends to compact on close, but if anyone but me is logged in, they all get the "file permissions" error.

Yet, they are able to go outside of Access and creat a new file in the directory.

And even Access can create new files in the directory, because occasionally those "database1", Database2" etc. files show up, containing only an MsysCompactError table. And here's something strange: Even though this is an Access 2010 database, they show up as "Database1.mdb" instead of .accdb, and all of these files seem to be corrupt: When I try to open them I get multiple errors like "parent ID name is not an index in this table", and the msyscompacterror table is full of :
"You do not have the necessary permissions to use the '[whatever]' object. Have your system administrator or the person who created this object establish the appropriate permissions for you."

I've also tried compacting from the command line, no help.

I've been trying to find a solution to this for the better part of a year.

Any and all ideas much appreciated!

I have a very large back end table, approx 4 million records. I recently rebuilt this table from scratch adding a composite primary key and about 4 indexed fields, then loaded all the records into the table. The final size of the db file was 1.5 gigs. Rather than leave well enough alone, I decided to compact and repair the database. Re-opening the file this morning reveals no indexes and no primary keys along with a MSysCompactError -1404 'Field1' is not an index in this table.

I would much have preferred to store these tables in SQL Server, but my old nemisis, our IT department, doesn't want to (of course) share. I am open to suggestion, but without a SQL Server option, the only alternative I can see is to split the data out by manufacturing section into 8 separate tables stored in 8 different Access files, which I hate. Like I said, I'm open to suggestions if you have them, but I thought I share this as a cautionary tale.

I am completely clueless about VBA so I am really stuck.

My database was created in Access 2007, but has been saved down to allow use by 2002 - 2003 Access, and has been split to allow for multiple users.

When I try to go in now at the entry file, I get the following error message:

The database cannot be opened because the VBA project contained in it cannot be read. The database can be opened only if the VBA project is first deleted. Deleting the VBA project removes all code from modules, forms and reports. You should back up your database before attempting to open the database and delte the VBA project.

When I select OK, it closes the file. I have a backup created, but when I try to open the file again I get the following error messages repeatedly:

'ParentIdName' is nt an index in this table
'IdName' is not an index in this table

This just cycles several times when I hit OK and then it kicks it out to create a new database, and will never open my original file.

When I try to open the back up file I get the following error message:

The Microsoft Office Access database stopped the process because you and another user are attempting to change the same data at the same time.

I have removed the files from the shared drive and pulled them to my desktop so I could work exclusively so there can't be anyone else using the file at the same time.

I had contemplated just recreating the database and importing the existing information, but I can't get to the information to import it.

I am so lost and cannot figure out what to do. Can anyone offer any assistance?



When opening a database, I get the message "AO Index is not an index in this table." I then cannot open the database. Is this a real index? Can I delete it? I have copies of the database without the problem, but I want to be sure it won't happen again after the database is deployed.

when trying to open a database to make a change to a form I encountered an error message I not yet seen:

" isn't an index in this table. Look in the indexes collection of the TableDef object to determine the valid index names.

Can anyone give me some insite as to how to fix this problem?


I have this query

SELECT tblInput.Referrer, Count(tblInput.[Centre Code]) AS [Number of Referrals]
FROM [tblMental Health] RIGHT JOIN tblInput ON [tblMental Health].[Mental Health] = tblInput.Referrer
WHERE (((tblInput.[Referral 1 Received Date]) Between [Forms]![frmReportDates]![txtStartDate] And [Forms]![frmReportDates]![txtEndDate]))
GROUP BY tblInput.Referrer;

This picks up my Referrer ID instead of my Referrer Name.

It works ok in my form frmInput, as I can hide my ID column and it still displays the Name however because it is the ID that's stored in my table tblInput that is what my query picks up...

I know I missed something or mucked up the relationship, can anyone help me unmuddle this??

What I'm trying to do is create a delivery sequence list for a mail route. I have a table with occupant names and addresses in one table and previous occupants with current and expired forwarding orders in another table. The primary key in the current occupants table is an autonumbered field used as the foreign key in the previous occupants table to pull associated records from there. To allow changes in the delivery sequence or add a delivery, I added a field in the current occupants table for a sequence number and it is this field I need to find a way to manage. Here is my problem - when I add a record and assign a sequence number, is there a way to make Access check for duplicates and handle the adjustment of all the other sequence numbers to accommodate the new entry, or do I have to do that in code? If it's code, can someone suggest a strategy to do the deed? I used to use some two way linked lists and build an inverted list from that as an index in this sort of situation, but that was a home-brew db that was code from scratch and I'm just wondering if there isn't something built into Access that can be used to do the same thing more simply.

Thanks for any suggestions.

Good morning All.

I have a database which updates via a Function in a module every morning (i.e imports and exports data).

Yesterday the DB crashed and incurred a problem. The DB was closed down and re-opened.

When it was re-opened all the Tables, Queries, Forms, Reports and Modules were no longer showing in the DB window.

When I selected the Tables tab the following message appeared:

Operation Invalid Without Current Index

this was then followed by another message:

"Isn't an index in this table. Look in the indexes collection of the TableDef object to determine the valid index names

This also appears if I try selecting the other tabs i.e. Queries, Modules etc.

The strange thing is the DB still updates at its stipulated time, and still imports and exports data. I am running Access 97.

Does anybody have any idea of how I can sort this out?




I am getting an error message for an udate button I have programmed. The error reads

'Primary Key' isn't an index in this table. Look in the indexes collection of the TableDef object to determine the valid index names.

I have the primary key set on both tables but I am not sure why this is happening.
Any suggestions would be great!


Private Sub Command20_Click()

Dim rsupdate As Recordset
Dim dbmain As Database

Set dbmain = CurrentDb()
Set rsupdate = dbmain.OpenRecordset("tbltest")

Dim Jobno As String
Jobno = txtJobNo.Text

'I get the error on the next line

rsupdate.Index = "Primary Key"
rsupdate.Seek "=", txtJobNo.Text

If rsupdate.NoMatch Then
MsgBox " Test"

End If

End Sub
ford n series tractors history

Hi all. I'm really not sure on which forum this should appear in but I need help with a Error message. I have a database that allows user to delete and enter records. Everything has been working fine until a couple days ago I recieved this error message:

" isn't an index in this table. Look in the Indexes Collection of the TableDef object to determine the valid index names"

I can not see any of my Access Objects. All I get the error message. I've tried everything. Can anyone help or explain to me why this is happening. Thank you for any clarification on this problem.

When I click a tab (table,queries,reports or module) I receive an error that says (" isn't an index in this table. Look in the indexes collection of the TableDef object to determine the valid index names). Please help.


I am trying to repair my back-end database but am having trouble. Everytime I select 'Repair Database' I get the following error:

'BE_Data.mdb' isn't an index in this table. Look in the Indexes collection of the TableDef object to determine the valid index names.'

Can anyone tell me what this means, or more to the point, can anyone tell me how to fix this problem.

When I try to open the database it brings up my startup form but when I try to view the tablesthrough the database window I get an error message "Operation invalid without a current index"

When I try to view others...queries,forms I get this other error message " "isn't an index in this table. Look in the Indexes collection of the TableDef object to determine the valid index names."

Help!!! I cannot do anything.

Thank you.


I have an Access database where searching in a particular field is too slow. I'm looking to create an index for it; This operation works if done manually in the MS Access tool and does improve access time (go table layout, field settings, enable index).

But I'm stuck trying to get a programmed solution with Microsoft's DAO classes (in C++) working. My code boils down to this:

Code: CDaoIndexInfo IndexInfo; CDaoIndexFieldInfo FieldInfo; FieldInfo.m_strName = "Id"; FieldInfo.m_bDescending = false; IndexInfo.m_bClustered = false; IndexInfo.m_bForeign = false; IndexInfo.m_bIgnoreNulls = false; IndexInfo.m_bPrimary = false; IndexInfo.m_bRequired = false; IndexInfo.m_bUnique = false; IndexInfo.m_lDistinctCount = false; IndexInfo.m_nFields = 1; IndexInfo.m_pFieldInfos = &FieldInfo; IndexInfo.m_strName = "Id"; try { if (!GetTableDef()->CanUpdate()) { Error("Cannot update DB?"); } GetTableDef()->CreateIndex(IndexInfo); I do this right after opening the database (CDaoDatabase).

GetTableDef() returns a CDaoTableDef object representing the table I want to change.

What happens is this:

1. CanUpdate() returns true, indicating the table definition should be modifiable
2. CreateIndex() throws an exception

Error 3211- The database engine could
not lock table

... indicating it is already in use or locked by a different process or operation.

I'm stuck.

The docs indicate that CanUpdate() shouldn't even return true because this is not a newly created DB but an existing one.

Where do I start? Change the CDaoDatabase Open() operation? Associate the CDaoTableDef in a different manner? Etc.

Thanks a lot for your time

I have an attachment field in my table where PDF files are stored. Is it possible set a button up to email the stored attachment using a macro or maybe some code behind a button?
This is code I used to email a report as a PDF.
Private Sub cmdEmail_Click()
On Error GoTo Err_cmdEmail_Click
Dim stDocName As String
Dim stMsg As String
‘Dim stAddress As String
Dim stSubject As String
stMsg = "See Attachment"
stDocName = "rptBoloMain"
‘stAddress = Emil@mail
stSubject = "Requested File”

DoCmd.OpenReport stDocName, acPreview, , "[ID]=" & Me![ID]
DoCmd.SendObject acSendReport, stDocName, acFormatPDF, stAddress, , , stSubject, stMsg, True
Exit Sub
MsgBox Err.Description
Resume Exit_cmdEmail_Click
End Sub

In a table (tblMnthNr) there are 3 indexes, the third named 'MonthNr'.
There are at least two fields in the table: MnthNr and Days
Every time VBA reports that rs.Index is not available for this type object (error 3251). The construction is (with MndSel as String for the Seek):

Dim IndexNaam As String
Dim strCntD as String
Dim rs As Recordset
Dim db As Database

Set db = CurrentDb

Set rs = db.OpenRecordset("tblMnthNr")

IndexNaam = "MonthNr"
rs.Index = IndexNaam <= here stops the run.
rs.Seek "=", MndSel
strCntD = rs!Days

How can I VBA let handle it in the right way?

Not finding an answer? Try a Google search.