[AccessD] How to Delete or modify an index in VBA

John Skolits JSkolits at CorporateDataDesign.com
Wed Mar 12 13:40:01 CST 2003


Scott,

Thanks!

Just so you know I'm not a real dufuss, I did spend about 1/2 hour chekcing
the online help files , MS knowledge base and some of my other favorite
Access site before posting the question. I seacrhed for 'delete indexes' or
'deleting index" and other variations and still no luck. Had I searched for
'Drop', I would have found it! Oh Well!


Thanks!!!


John


-----Original Message-----
From: accessd-admin at databaseadvisors.com
[mailto:accessd-admin at databaseadvisors.com]On Behalf Of Marcus, Scott
(GEAE, RHI Consulting)
Sent: Wednesday, March 12, 2003 1:49 PM
To: 'accessd at databaseadvisors.com'
Subject: RE: [AccessD] How to Delete or modify an index in VBA


Straight form the Access97 Help file...


Sub DropX1()

	Dim dbs As Database

	' Modify this line to include the path to Northwind
	' on your computer.
	Set dbs = OpenDatabase("Northwind.mdb")

	' Delete NewIndex from the Employees table.
	dbs.Execute "DROP INDEX NewIndex ON Employees;"

	dbs.Close

End Sub

Scott

-----Original Message-----
From: John Skolits [mailto:JSkolits at corporatedatadesign.com]
Sent: Wednesday, March 12, 2003 1:44 PM
To: AccessD at databaseadvisors.com
Subject: [AccessD] How to Delete or modify an index in VBA


Anyone know how to delete an index in VBA after it's already been added to a
collection.
Another option would be to modify it (add a field) or to set it's Unique
property to false. Any of these would be fine.

I know how to Create an index, just can't delete it. I am using DAO but
could also use ADO if that's the better solution.


John Skolits

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list