change data field type in table

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
 
A

Allen Browne

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

John W. Vinson

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]
 

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