what will be the initial value of the fields created in a new table(dao)?
how to change it?

That all depends upon if you allow those fields to default to their default values or not. As for changing those default values lets see your table creation code...

Set login = OpenDatabase("database path")
Set newtable = login.CreateTableDef("table_name")
With newtable
.Fields.Append .CreateField("name", dbText, 30)
end with
now wat is the default initial value and how can i change it?

Okay, this example works with both 2.5/3.51 and 3.6...

Dim daoDb As DAO.Database
Dim daoTd As DAO.TableDef

Set daoDb = DBEngine.CreateDatabase("C:\z\MyDB.mdb", dbLangGeneral, dbVersion30)

Set daoTd = daoDb.CreateTableDef("MyTable")

daoTd.Fields.Append daoTd.CreateField("iID", dbLong)
daoTd.Fields("iID").Attributes = dbAutoIncrField

daoTd.Fields.Append daoTd.CreateField("vFName", dbText, 30)
daoTd.Fields("vFName").AllowZeroLength = True
daoTd.Fields("vFName").DefaultValue = "Enter First Name Here"

daoDb.TableDefs.Append daoTd

Set daoTd = Nothing
daoDb.Close
Set daoTd = Nothing

Good Luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.