ALTER TABLE query

  • Thread starter Thread starter shaggles
  • Start date Start date
S

shaggles

I'm trying to change a data type for 1 column in a temp
table before sending it of to another user. However I am
having trouble witht the query. I tried these 2 but
neither worked:
ALTER TABLE MyTable
MODIFY AnyField Int;

ALTER TABLE MyTable
ALTER COLUMN AnyField Int;

What am I doing wrong?
 
HI,


Try it in the immediate debug window, not using DAO, not using the query
designer, not using CurrentDb:



CurrentProject.Connection.Execute "ALTER TABLE temp ALTER COLUMN
columnName NewDataType ; "

You may specify the size of the data type, if that makes sense for the new
data type. Like most Jet 4.0 extensions, you have to use ADO to be able to
access them.



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top