J
Jay
Access version: 2007
Is there a way to change the Precision property of a Decimal field using VBA
code? I have tried
myTableDef.Field(FieldNum).Properties("CollatingOrder") = 13
and
myRecordSet.Field(FieldNum).Properties("CollatingOrder") = 13
but both give an "Invalid arguement" error.
I have also tried using an ADO recordset:
rs.Fields("DField").Precision = 13
In this case, no errors are thrown and the property is changed, but when I
close the connection and open the table in design view in Access, the
precision hasn't changed.
I also tried an SQL
ALTER TABLE tablename ALTER COLUMN columname DECIMAL (13,6)
statement, but it gives a syntax error. According to the access help file,
only text and binary fields can take a (size) parameter.
Jay
Is there a way to change the Precision property of a Decimal field using VBA
code? I have tried
myTableDef.Field(FieldNum).Properties("CollatingOrder") = 13
and
myRecordSet.Field(FieldNum).Properties("CollatingOrder") = 13
but both give an "Invalid arguement" error.
I have also tried using an ADO recordset:
rs.Fields("DField").Precision = 13
In this case, no errors are thrown and the property is changed, but when I
close the connection and open the table in design view in Access, the
precision hasn't changed.
I also tried an SQL
ALTER TABLE tablename ALTER COLUMN columname DECIMAL (13,6)
statement, but it gives a syntax error. According to the access help file,
only text and binary fields can take a (size) parameter.
Jay