Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Table - Allow Zero Lenght

Status
Not open for further replies.

AntiLiteratos

Programmer
Jul 30, 2003
19
AR
Hello:

With a 'create table' or an 'alter table' SQL statement I can add tables or columns to my Access database.
I can set new columns to non-required using 'null' in the SQL statement, but is there a way to set the 'Allow Zero Length' property to 'yes' as well?

Thanks.

Guillermo.
 
You can't do it with an SQL statement, but after the table has been created you can do it with DAO:
CurrentDb.Tabledefs(&quot;<table name>&quot;).Fields(&quot;<field name>&quot;).AllowZeroLength = True
Note that you also need to make the field required in order for AllowZeroLength to store a zero-length string in it.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top