Change a Table's data type with code.

  • Thread starter Thread starter John
  • Start date Start date
J

John

I am looking for code that will change the fields data
type from a number to text in an existing table in an
Access db(2002).
Any help is much appreciated.
 
John

As far as I know, there is no way simply change a field's data type. Instead you must append a field of the type you would like to change to, transfer all of the values from your old field to your new field, delete your old field, and rename your new field. I believe this is also what Access does when you chage the type through the GUI, however it doesn't show the you steps

Hope this helps
Jak


----- John wrote: ----

I am looking for code that will change the fields data
type from a number to text in an existing table in an
Access db(2002)
Any help is much appreciated
 
Thanks Jake
-----Original Message-----
John,

As far as I know, there is no way simply change a field's
data type. Instead you must append a field of the type
you would like to change to, transfer all of the values
from your old field to your new field, delete your old
field, and rename your new field. I believe this is also
what Access does when you chage the type through the GUI,
however it doesn't show the you steps.
 
Back
Top