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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do set the default property using SQL?

Status
Not open for further replies.

erkle

Programmer
Apr 10, 2002
5
US
In MS Access 2000, what SQL statement would I use to add a field to a table and set the default property. I know that to add a field I could use, "ALTER TABLE Customers ADD Comments Text 100;" but I don't know how to make this field have a default value of "test". Can anyone help?
 
You cannot set a default value through SQL. It is a function of the Table Object. You can do this through VBA programming using ADO methods petersdaniel@hotmail.com
"If A equals success, then the formula is: A=X+Y+Z. X is work. Y is play. Z is keep your mouth shut." --Albert Einstein

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top