Gustav Brock
Gustav at cactus.dk
Fri Feb 4 03:59:24 CST 2005
Hi David
Try with
CreateProperty("DecimalPlaces", dbByte, 2)
/gustav
>>> newsgrps at dalyn.co.nz 04-02-2005 06:26:15 >>>
Group,
A97. Here is my code:
Dim dbsBE As Database, tbldef As TableDef, fld As Field
Set dbsBE =
DBEngine.Workspaces(0).OpenDatabase(DLookup("DataDirectory", "Variables
Setup"))
Set tbldef = dbsBE.TableDefs("Variables")
'create the fields
Set fld = tbldef.CreateField("AnnualReturnCA11", dbSingle)
tbldef.Fields.Append fld
fld.Properties.Append fld.CreateProperty("Format", dbText,
"Percent")
fld.Properties.Append fld.CreateProperty("DecimalPlaces", dbText,
"2")
fld.Properties("DefaultValue").Value = 0
This all works except the DecimalPlaces property shows "Auto" in the
table
(and not 2). I have tried
fld.Properties.Append fld.CreateProperty("DecimalPlaces",
dbInteger, 2)
but this also doesn't work.
Any suggestions?
Regards
David Emerson
Dalyn Software Ltd
25 Cunliffe St, Churton Park
Wellington, New Zealand
Ph/Fax (04) 478-7456
Mobile 027-280-9348