These examples show how to use a DDL query statement to:
- change the size of a field;
- change the data type of a field;
- add a new field to a table;
- remove a field from a table:
ALTER TABLE MyTable ALTER COLUMN MyText2Change TEXT(100);
ALTER TABLE MyTable ALTER COLUMN MyField DOUBLE;
ALTER TABLE MyTable ADD COLUMN SomeNewField TEXT(60);
ALTER TABLE MyTable DROP COLUMN SomeNewField;
You can execute a string using DAO
dbEngine(0)(0).Execute strSQL
or ADO:
CurrentProject.Connection.Execute strSql

Signature
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.
> HI there,
>
> I need to be able to add a new field to my table and
> change the data types of certain fields by using code.
>
> Any Ideas?