I don't think you can set the Allow Zero Length property via a DDL query
statement.
You can set it through DAO, through:
dbEngine(0)(0).TableDefs("MyTable").Fields("MyField").AllowZeroLength
Or using ADOX you can set Properties("Jet OLEDB:Allow Zero Length") of the
Column of the Table in the Catalog.
It is unfortunate that different versions of Access are inconsitent in how
these properties are set by default, depending on whether you create the
field through the interface, DDL, DAO, or ADOX.
In general DAO is still the most powerful and suitable library for setting
properties of JET tables. For example it is the only way to set the
DisplayControl of a Yes/No field to check box.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
EugeneLeung said:
suppose:
Table A
Column A_a (primary Key)
Column A_b (Char(50); Allow Zero-length : False
how can i change it to allow zero-length string with alter statements
Alter Table [A] Alter Column [A_b] char(50) .......
thanks