K
Kou Vang
Is it possible to modify the existing field type while in the tabledef
collection?
Set tdeF = db.TableDefs("CLMPMedians")
tdeF.Fields.Append tdeF.CreateField("StationNum", dbInteger)
tdeF.Fields("Median").Type = dbDouble
I don't see a reason to through in an ALTER TABLE SQL command if I'm already
doing indexing and field work in the TableDef. I have seen code to create a
new field with new type and new size, adding it to the table, then deleting
the old field and renaming the new field, is that really necessary? Is there
no "short cut" for modifying field type? I also tried:
fld.Type = dbDouble
Any suggestions?
Kou
collection?
Set tdeF = db.TableDefs("CLMPMedians")
tdeF.Fields.Append tdeF.CreateField("StationNum", dbInteger)
tdeF.Fields("Median").Type = dbDouble
I don't see a reason to through in an ALTER TABLE SQL command if I'm already
doing indexing and field work in the TableDef. I have seen code to create a
new field with new type and new size, adding it to the table, then deleting
the old field and renaming the new field, is that really necessary? Is there
no "short cut" for modifying field type? I also tried:
fld.Type = dbDouble
Any suggestions?
Kou