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).
 
Back
Top