John W. Colby
jwcolby at colbyconsulting.com
Sun Jun 26 08:07:24 CDT 2005
I figured that there was a way to see indexes via DAO since it can see anything in the db, it's just not "visual". Anyway, thanks for the code and here it is again (up at the top of the email ;), slightly modified to pass in a tablename: Public Function ChkIndexes(strTblName As String) Dim dbs As Database Dim tdf As TableDef Dim intI As Integer Dim intF As Integer Set dbs = CurrentDb() Set tdf = dbs.TableDefs(strTblName) For intI = 1 To tdf.Indexes.Count With tdf.Indexes(intI - 1) Debug.Print .Name For intF = 1 To .Fields.Count Debug.Print , .Fields(intF - 1).Name Next intF End With Next intI End Function John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Sunday, June 26, 2005 4:32 AM To: accessd at databaseadvisors.com Subject: [AccessD] Relationship and hidden index (was: Error in Access 2003that I've never seen before) Hi John >>> jwcolby at colbyconsulting.com 06/25 11:49 pm >>> If this is an Access container you are discussing, any field used in a relationship has an index created on that field by the Jet engine as the relationship is created. This index is hidden. It simply cannot be seen in any way that I am aware of. Thus if you are discussing a field like this, there is likely that hidden index still in existence. --- If not seen, they can be listed. Here's an old posting of mine: