John Skolits
JSkolits at CorporateDataDesign.com
Wed Mar 12 16:32:00 CST 2003
Trying to make me look bad eh? :) Actually, I did look and still couldn't easily find the 'drop' feature. I no longer use the Access 97 help file, but still couldn't seem to find it in A2K help. Must be my old age. 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 4:16 PM To: 'accessd at databaseadvisors.com' Subject: RE: [AccessD] How to Delete or modify an index in VBA John, Fortunately, you don't to remember to look up 'Drop' to find out that it is used to delete an index. You can look up 'INDEX' and get the same information. Glad to have helped... Scott Marcus -----Original Message----- From: John Skolits [mailto:JSkolits at corporatedatadesign.com] Sent: Wednesday, March 12, 2003 2:40 PM To: accessd at databaseadvisors.com Subject: RE: [AccessD] How to Delete or modify an index in VBA 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 _______________________________________________ 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