I have a piece of code I am using to create a table:
dim db as database
dim tdf as TableDef
dim strnewtable as string
db = currentdb()
Set db = OpenDatabase("h:\customer\master.mdb"
Set tdf = db.CreateTableDef(strNewTable)
With tdf
.Fields.Append .CreateField("NAME2", dbText, 10)
.Fields.Append .CreateField("BALANCE", dbDOUBLE)
db.TableDefs.Append tdf
End With
tdf.Fields("NAME2"
.AllowZeroLength = True
This is not the complete code and does work in its entirity, but I thought this would give a good idea of what I am doing. My problem is, when I then proceed to fill the table with data, the default is auto on decimal places for the balance field I created, so if there is a zero after the decimal place it removes it. ie.... 123.30 = 123.3 or 123.00 = 123
I need to change the decimal place on the table to two before bring in the data, can anyone help?
dim db as database
dim tdf as TableDef
dim strnewtable as string
db = currentdb()
Set db = OpenDatabase("h:\customer\master.mdb"
Set tdf = db.CreateTableDef(strNewTable)
With tdf
.Fields.Append .CreateField("NAME2", dbText, 10)
.Fields.Append .CreateField("BALANCE", dbDOUBLE)
db.TableDefs.Append tdf
End With
tdf.Fields("NAME2"
This is not the complete code and does work in its entirity, but I thought this would give a good idea of what I am doing. My problem is, when I then proceed to fill the table with data, the default is auto on decimal places for the balance field I created, so if there is a zero after the decimal place it removes it. ie.... 123.30 = 123.3 or 123.00 = 123
I need to change the decimal place on the table to two before bring in the data, can anyone help?