Deleting a table's field with VBA

  • Thread starter Thread starter Guest
  • Start date Start date
To delete the contents of a field, leaving the definition ...

UPDATE tblTest SET tblTest.TestText = Null

To remove the definition of the field from the table ...

ALTER TABLE tblTest DROP COLUMN TestText

You can execute these SQL statements from VBA code using either
CurrentDB.Execute (in an MDB) or CurrentProject.Connection.Execute (in an
MDB or an ADP).
 

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

Back
Top