Change Field Property using VBA

R

Rafi

I have a table, EMPL_ISH, that is created automatically and I need to change
the definition of one its fields, EMPL_NBR from a Number\Double to
Number\Integer. Can you help with the VBA code to enable this change.

Thanks in advance
 
D

Douglas J. Steele

You need to use DDL (Data Definition Language).

CurrentDb.Execute "ALTER TABLE EMPL_ISH ALTER EMPL_NBR Integer",
dbFailOnError

Are you sure you want an Integer, and not a Long Integer? If you need a Long
Integer, use Long rather than Integer.
 

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