I am creating a table through VBA and when I define my number fields, I want to specify # of decimal places - is there any way to do this?
Here's what I have now:
Dim NewInput As TableDef
Set NewInput = CurrentDb.CreateTableDef("TblInput"
With NewInput
.Fields.Append .CreateField("Cusip", dbText)
.Fields.Append .CreateField("Acct6", dbText)
.Fields.Append .CreateField("RecType", dbText)
.Fields.Append .CreateField("BBHNum", dbText)
.Fields.Append .CreateField("FundCode", dbDouble)
.Fields.Append .CreateField("FoxBal", dbDouble)
.Fields.Append .CreateField("BlushBal", dbDouble)
.Fields.Append .CreateField("OptCBal", dbDouble)
.Fields.Append .CreateField("OptRBal", dbDouble)
.Fields.Append .CreateField("UAFBal", dbDouble)
.Fields.Append .CreateField("PosNeg", dbText)
.Fields.Append .CreateField("Price", dbInteger)
.Fields.Append .CreateField("FundName", dbText)
.Fields.Append .CreateField("FundDesc", dbText)
.Fields.Append .CreateField("AcctName", dbText)
.Fields.Append .CreateField("ReconDate", dbDate)
CurrentDb.TableDefs.Append NewInput
End With
I want those Double fields to have 5 decimal places.
Here's what I have now:
Dim NewInput As TableDef
Set NewInput = CurrentDb.CreateTableDef("TblInput"
With NewInput
.Fields.Append .CreateField("Cusip", dbText)
.Fields.Append .CreateField("Acct6", dbText)
.Fields.Append .CreateField("RecType", dbText)
.Fields.Append .CreateField("BBHNum", dbText)
.Fields.Append .CreateField("FundCode", dbDouble)
.Fields.Append .CreateField("FoxBal", dbDouble)
.Fields.Append .CreateField("BlushBal", dbDouble)
.Fields.Append .CreateField("OptCBal", dbDouble)
.Fields.Append .CreateField("OptRBal", dbDouble)
.Fields.Append .CreateField("UAFBal", dbDouble)
.Fields.Append .CreateField("PosNeg", dbText)
.Fields.Append .CreateField("Price", dbInteger)
.Fields.Append .CreateField("FundName", dbText)
.Fields.Append .CreateField("FundDesc", dbText)
.Fields.Append .CreateField("AcctName", dbText)
.Fields.Append .CreateField("ReconDate", dbDate)
CurrentDb.TableDefs.Append NewInput
End With
I want those Double fields to have 5 decimal places.