Alter/Change Text Column Field Size

R

Ross

How can I change the size of a text column "Field4" from 3 to 50 on a
recently imported table? I need to do this using VBA.

Thank you

Ross
 
M

Marshall Barton

Ross said:
How can I change the size of a text column "Field4" from 3 to 50 on a
recently imported table? I need to do this using VBA.


sql = "ALTER TABLE thetable ALTER COLUMN Field4 Text(50)"
Set db = CurrentDb()
db.Execute sql, dbFailOnError
Set db Nothing
 
R

Ross

Marsh,

Awesome!

Thanks


Marshall Barton said:
sql = "ALTER TABLE thetable ALTER COLUMN Field4 Text(50)"
Set db = CurrentDb()
db.Execute sql, dbFailOnError
Set db Nothing
 

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