is there a way to drop an index on a column field in a table in Access 2010

I am importing tables and there are a lot of them.  Is there a way, with vba, to remove the index on certain columns?  I will have to be doing this process several times and I want to automate it.  Problem is when I try to remove a column, if there is an index on it, I cannot drop the column in code.
Sandra SmithRetiredAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Yes, you may use DROP INDEX command.

More info:
Sandra SmithRetiredAuthor Commented:
I already did a search and what is confusing is they want a name of an index, but column indexes do not have names.  That is the issue I need, how to drop the index on a column, not a named index.  Please provide an example, not a link.
Rey Obrero (Capricorn1)Commented:
try this code

Dim db As DAO.Database, td As DAO.TableDef, fld As DAO.Field
Set db = CurrentDb
For Each fld In db.TableDefs("NameOFTable").Fields
    If fld.Name = "Field1" Then
        fld.Name = "Field2"
    End If
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Rey Obrero (Capricorn1)Commented:
oops, sorry wrong thread..
Sandra SmithRetiredAuthor Commented:
OK, Ray,your suggestion answered another question!  So, please post it to that question as this one related to getting rid of an index, not changing the name of an existing column!  LOL!!  Please post to the other question and I will accept as your solution worked perfectly for what I wanted!
If you create the table in VBA and assign names to all indexes then you may drop such indexes. You may also enumerate all indexes and retrieve the index names. More ideas are in this code:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sandra SmithRetiredAuthor Commented:
Ok, this did it and actually, is better than what I wanted.  If I can loop through all the indexes, it saves me having to do them one by one.  The prior developers put indexes on about half the columns of every table so this saves me a good deal of time.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.