Altering Column

  • Thread starter Thread starter Sally
  • Start date Start date
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)"
 
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

Similar Threads

ALTER COLUMN syntax 2
Alter Table 1
Form "objects" appear inside a table structure 4
Access Access VBA question 0
modifiy field type by vba 6
Getting error with table update 8
Alter multiple columns types 2
importing data 1

Back
Top