I have a table that already exists and I want to change the size of one of the fields in code from 7 to 50. I have tried using
Dim tdf As TableDef, fld1 As Field
Dim dbs As Database
Set dbs = CurrentDb
Set tdf = dbs.TableDefs("tblsernums"
Set fld1 = tdf.Fields("datesold"
fld1.Size = 50
Apparently the 'size' property is read only if it already exists in the collection.
I've also tried fld1.fieldsize = 50, but had the same read-only problem.
There must be a way to change the field size after it has been created using VB!!!!
Thanks for any help you can give me.
Mike Rohde
rohdem@marshallengines.com
Dim tdf As TableDef, fld1 As Field
Dim dbs As Database
Set dbs = CurrentDb
Set tdf = dbs.TableDefs("tblsernums"
Set fld1 = tdf.Fields("datesold"
fld1.Size = 50
Apparently the 'size' property is read only if it already exists in the collection.
I've also tried fld1.fieldsize = 50, but had the same read-only problem.
There must be a way to change the field size after it has been created using VB!!!!
Thanks for any help you can give me.
Mike Rohde
rohdem@marshallengines.com