[AccessD] Indexes

Martin Reid mwp.reid at qub.ac.uk
Fri Jun 2 09:39:06 CDT 2006


Thanks guys will play about with that,. Thank god tht was an easy one. Was feelign a little stupid when I could not get it.
 
Martin
 
 
 
Martin WP Reid
Training and Assessment Unit
Riddle Hall
Belfast
 
tel: 02890 974477
 

________________________________

From: accessd-bounces at databaseadvisors.com on behalf of Andy Lacey
Sent: Fri 02/06/2006 16:31
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Indexes



Hi Martin
Here's code to get the indexes of a table

Dim idx As Index

'Then, assuming you have your TableDef in tbl

For Each idx In tbl.Indexes
'You can get at such things as
idx.Foreign
idx.Name
idx.Unique
idx.Primary
Then you can get at the idx.Fields collection and enumerate the fields of
the   index. I guess you could then enumerate the Properties collection of
each Field and find out each field's data type and, probably, length
Next


--
Andy Lacey
http://www.minstersystems.co.uk <http://www.minstersystems.co.uk/> 




--------- Original Message --------
From: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
To: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
Subject: [AccessD] Indexes
Date: 02/06/06 12:31

I want to loop over all tables in a database and get the Index name and
length. I can get the tables ok but cant seem to get the index length.

Martin

Martin WP Reid
Training and Assessment Unit
Riddle Hall
Belfast

tel: 02890 974477








--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com <http://www.databaseadvisors.com/> 

________________________________________________
Message sent using UebiMiau 2.7.2

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com <http://www.databaseadvisors.com/> 




More information about the AccessD mailing list