Change the data type property of a field in a table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.).
 
Back
Top