Change Field Property using VBA

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

Guest

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