You can execute a DDL query statement
dbEngine(0)(0).Execute "ALTER TABLE ...", dbFailOnError
From memory that just loses any data that no longer fits (e.g. non-numeric
data if you ALTER COLUMN to a number).
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"MarkD" wrote in message
...
Using Access 2000.
I want to programmatically add a field to a table and
modify another field. Can I write an ALTER TABLE
statement, or do I have to change it via tabledef?
Also, one of the fields we change from text to numeric,
which invalidates some data (which is okay). Right now, I
open the table in design mode, change the field, save the
table. Access warns of the error and I just accept it.
Will I be able to change the field in SQL (or via
tabledef), or will these invalid values cause Access to
not allow me to do that?