Altering Column

S

Sally

I have created a table through a make table query,
however I would like to amend the coulmn sizes from say
255 to 6, I thought the following syntax would work but
it doesn't.....can anybody help????

DoCmd.RunSQL "ALTER TABLE [table Name] ALTER COLUMN
[field name] char(6)"
 
M

Michel Walsh

Hi,


Indeed. Try ADO in that case:

CurrentProject.Connection.Execute "ALTER TABLE tableName ALTER COLUMN
fieldName VARCHAR(6) "


Generally, Jet 4.0 extensions work only with ADO, not with DAO (not with
DoCmd, not with the designer). You can try the previous line in the
immediate debug window.


Hoping it may help,
Vanderghast, Access MVP
 

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

Top