Thread: delete columns
View Single Post
  #1  
Old January 30th, 2006, 01:26 AM
accessman2 accessman2 is offline
Member
 
First recorded activity by OfficeFrustration: Dec 2005
Posts: 4
Default delete columns

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?