set standardværdi med dao .... ved oprettes af tabel....?
Jeg har fået det her hint ...nogle der kan give mig en svar på hvordan det skal forsættes:First, if you palce your question under Access then you may get more responce!
I am not sure that you can create default values using SQL. You should be able to use ADO to do it, but as I am no expert in ADO then I am not at all sure of which collection and methods to use.
In DAO its something like
Dim dbs as database
Dim tdf as TableDef
Dim fldName as field
Set db = OpenDatabase .....
set tdf = dbs.CreateTableDef....
set fldname = tdf.createField(\"Name\", dbText)
With fldname
.required = True
.Size = 40
.AllowZeroLength = True
.DefaultValue = \"Unknown\"
End with
tdf.fields.append fldName
dbs.Tabledefs.append tdf
or something like that, it may give you some ideas ..
