Drop field from table

  • Thread starter Thread starter cynthia
  • Start date Start date
C

cynthia

How would I go about removing a field from an existing table through vb code?
I would appreaciate any help on this. I posted another question on excel
imports yesterday and cannot find it in the forum, so my posts may be having
issues.

Thank you in advance for any help you can give me.
 
How would I go about removing a field from an existing table through vb code?
I would appreaciate any help on this. I posted another question on excel
imports yesterday and cannot find it in the forum, so my posts may be having
issues.

Thank you in advance for any help you can give me.

CurrentDb.Execute "ALTER Table [YourTableName] DROP [FieldName]"
 
Thank you thank you thank you I have been searching everywhere for this
information. It works like a charm.
--
Cynthia


fredg said:
How would I go about removing a field from an existing table through vb code?
I would appreaciate any help on this. I posted another question on excel
imports yesterday and cannot find it in the forum, so my posts may be having
issues.

Thank you in advance for any help you can give me.

CurrentDb.Execute "ALTER Table [YourTableName] DROP [FieldName]"

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
.
 
Thank you thank you thank you I have been searching everywhere for this
information. It works like a charm.

If you are only deleting a control on occasion that may be fine, but
just remember that there is a maximum number of 754 controls you can
add to a form over it's lifetime, so while it's easy enough to add or
delete a control, even though you have deleted it, it still counts
towards that 754 number. Don't do this on a regular basis on a form.
See Specifications in Access help.
 
If you are only deleting a control on occasion that may be fine, but
just remember that there is a maximum number of 754 controls you can
add to a form over it's lifetime, so while it's easy enough to add or
delete a control, even though you have deleted it, it still counts
towards that 754 number. Don't do this on a regular basis on a form.
See Specifications in Access help.

Oooops! Sorry. Regarding Access Specifications, I sleepily assumed
that we were talking about deleting 'controls' from a form, not a
field from a table.
Ignore my previous post.
 
I may be confused, I am dropping a field from a table, does this rule apply
to tables?
 
Back
Top