Table

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

Hi

Is it possible to change a field type from VBA code

Exemple

FRCatcher is in texte I want it to be Yes/No Type

Thanks for help
 
Hi Sam

Currentdb.Execute "Alter table MyTable alter column FrCatcher YesNo"

Note that this will work only in Jet 4.0 and above. In earlier versions you
must: (1) create a new field with DAO, (2) copy the data from the old field
to the new one with an update SQL query, (3) delete the old field with DAO.
 
Since the data will not make any sense anyway, delete the field and
create a Yes/No field.

Pavel
 
Back
Top