Table

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
 
G

Graham Mandeno

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

Pavel Romashkin

Since the data will not make any sense anyway, delete the field and
create a Yes/No field.

Pavel
 

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