delete columns

accessman2

Registered User.
Local time
Today, 11:31
Joined
Sep 15, 2005
Messages
335
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?
 
AccessBoy,

Searching the forum before posting would be a great benefit for you and the rest of the forum members.

This link will also help provide some useful info... "Before You Post" video.

Besides the fact the you have already answered your own question. If you have something that works...use it.
 
AccessBoy?
Wrong or right ghudson, no need to be disrespectful.
 
Anyone that refuses to use the forums search functions and continuously posts questions that have been already asked and answered has already lost my respect.

Need proof... check out the posts Accessboy has started... AccessBoy's Profile
 
I can appreciate your point, ghudson.
I just hope accesman2 got it.
 

Users who are viewing this thread

Back
Top Bottom