Kamis, 05 April 2012

Bls: [MS_AccessPros] Deleting Index

 

Thanx John,,,i was googling and finally found the right codes...
but your code is more simple and really works,,,tengkyu John

Regards
Hendra

________________________________
Dari: John Viescas <JohnV@msn.com>
Kepada: MS_Access_Professionals@yahoogroups.com
Dikirim: Rabu, 4 April 2012 17:38
Judul: RE: [MS_AccessPros] Deleting Index


 
Hendra-

Did you try ….

Dim db As DAO.Database, tdf As DAO.TableDef, intI As Integer

Set db = CurrentDb
Set tdf = db.TableDefs("Table1")
For intI = tdf.Indexes.Count - 1 To 0 Step -1
tdf.Indexes.Delete tdf.Indexes(intI).Name
Next intI

??

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-------------------------------

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of
agesthahendra@ymail.com
Sent: Wednesday, April 04, 2012 11:20 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Deleting Index

 
Hi Everyone,..

I've tried several codes to delete indexes on a tables, but still
got erorr. For example i have a table (named Table1) and Table1 have
2 fields (Field1 as Primary Key and Field2 indexed Yes/Duplicate OK,
all index were created manually in Table Design View), how do i can
delete all of index on Table1 in VBA..?
Any right direction would be gratefull...thank you..

Best Regards
Hendra

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___

Tidak ada komentar:

Posting Komentar