change data field type in table

  • Thread starter Thread starter jnewl
  • Start date Start date
J

jnewl

have a make table query and even though, i specify one of the fields as
currency, the field type is number in the table. how i can i specify in vb
the field as currency after the table has been built? thanks for your help
 
To programmatically change an existing Number field into a Currency field,
execute a DDL query:

Dim strSql As String
strSql = "ALTER TABLE MyTable ALTER COLUMN MyText2Change CURRENCY;"
DBEngine(0)(0).Execute strSql, dbFailOnError

Requires Access 2000 or later.
 
have a make table query and even though, i specify one of the fields as
currency, the field type is number in the table. how i can i specify in vb
the field as currency after the table has been built? thanks for your help

Well... don't do a maketable query *at all*. They're very rarely necessary!

Create a table with the desired datatypes and run an Append query instead.

John W. Vinson [MVP]
 
Back
Top