Change the data type property of a field in a table

S

SHIPP

I have a table called tmpEmpCurrent that is imported from Excel. It sets up
the field called F3 as a text field. I want to change this data type to a
long integer using VBA. Any help would be appreciated.
 
G

George Nicholson

Add a new long integer field to the table, update the NewField with OldField
data, delete the old field.

You can't really "change" the data type of a Field. When you ask Access/Jet
to change a DataType through the user interface it is actually doing all of
the above behind the scenes (which is why you can hit the 255 field limit
unexpectedly or see file size balloon if you make a lot of changes without
compacting. Compacting frees up all "OldField" space.).
 

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