Change fieldtype

  • Thread starter Thread starter ReidarT
  • Start date Start date
R

ReidarT

I want to change the fieldtype in a table from currency to number by code.
I know how to add a field in a table, but can not find how to change the
fieldtype.

regards
reidarT
 
Hi ReidarT

Provided you are using Jet 4 or later, you can use DDL:

Currentdb.Execute "alter table YouTable alter column YourField DOUBLE"

Otherwise, you must add a new field, execute an update query, and delete the
old field.
 
Thanks alot
reidarT
Graham Mandeno said:
Hi ReidarT

Provided you are using Jet 4 or later, you can use DDL:

Currentdb.Execute "alter table YouTable alter column YourField DOUBLE"

Otherwise, you must add a new field, execute an update query, and delete the
old field.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

ReidarT said:
I want to change the fieldtype in a table from currency to number by code.
I know how to add a field in a table, but can not find how to change the
fieldtype.

regards
reidarT
 
Back
Top