Change a Table's data type with code.

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.
 
J

Jake

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
 
G

Guest

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.
 

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