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
 

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

Similar Threads

Windows XP Change graph type in VBA 2
Getting the excel coordinates with oledb 0
Import files into access 1
Access and Excel 2
Option Group - Clear Yes/No 8
Field name 1
SQL "insert into" code not working 2
Data Entry VBA 4

Back
Top