D
Doctor
I'm trying to make an enforced relationship between tblClients and other
tables. But when I do I get the error that there are too many indexes on
tblClients.
Table Design View reveals that there are 4 indexes on this table. And wont
let me add more.
The code at the bottom reveals that there are only 10 indexes on this table
(includes 3 duplicate indexes).
I only have 11 number or foreign key fields in this table that I need to
index. I think I'm allowed near 30? There are 72 main tables in this database
(plus 46 more lookup tables). Probably about 32 or so tables need to be
related to tblClients. As far as I can tell, this should work? Please help.
Are there other hidden indexes somewhere? As I look at the indexes of other
tables with the code below, I notice indexes still present for old field
names that are no longer used. Is this a cause.
'******Code********
Sub ShowAllIndices()
Dim db As DAO.Database
Dim tdf As TableDef
Dim idx As Index
Dim fld As Field
Set db = CurrentDb()
For Each tdf In db.TableDefs
If Left(tdf.Name, 4) = "tblc" Then
Debug.Print tdf.Name
For Each idx In tdf.indexes
Debug.Print Tab(5), idx.Name
For Each fld In idx.Fields
Debug.Print Tab(10), fld.Name
Next fld
Next idx
End If
Next tdf
End Sub
tables. But when I do I get the error that there are too many indexes on
tblClients.
Table Design View reveals that there are 4 indexes on this table. And wont
let me add more.
The code at the bottom reveals that there are only 10 indexes on this table
(includes 3 duplicate indexes).
I only have 11 number or foreign key fields in this table that I need to
index. I think I'm allowed near 30? There are 72 main tables in this database
(plus 46 more lookup tables). Probably about 32 or so tables need to be
related to tblClients. As far as I can tell, this should work? Please help.
Are there other hidden indexes somewhere? As I look at the indexes of other
tables with the code below, I notice indexes still present for old field
names that are no longer used. Is this a cause.
'******Code********
Sub ShowAllIndices()
Dim db As DAO.Database
Dim tdf As TableDef
Dim idx As Index
Dim fld As Field
Set db = CurrentDb()
For Each tdf In db.TableDefs
If Left(tdf.Name, 4) = "tblc" Then
Debug.Print tdf.Name
For Each idx In tdf.indexes
Debug.Print Tab(5), idx.Name
For Each fld In idx.Fields
Debug.Print Tab(10), fld.Name
Next fld
Next idx
End If
Next tdf
End Sub