delete columns

A

accessman2

part 1:
tbl.Fields.Delete tbl.Fields(0).Name
tbl.Fields.Delete tbl.Fields(1).Name
tbl.Fields.Delete tbl.Fields(2).Name

part 2:
tbl.Fields.Delete "field0"
tbl.Fields.Delete "field1"
tbl.Fields.Delete "field2"

From the above codes:
the part 1 does NOT work.
the part 2 work.

If I run the part 1, then it give out the following message:
"Cannot delete a field that is part of an index or is needed by the
system."

Can we have a way to run as similar as the part 1?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top