What I'm looking to do seems simple, but I must be missing some obvious syntax. I just would like to change the fieldsize of a text field (increase size) of an existing table.
In the past I've worked around this by creating new tables and appending values, but help seems to indicate that it should be possible to manipulate it using the Size property of the field.
Any thoughts?
Just occurred to me to add some details. O2K on W2K
References to DAO 3.6, VBA & Access 9.0 Object library already set.
tdf.fields(fld.name).Size = 11
Generates a 3219 error
Mike
In the past I've worked around this by creating new tables and appending values, but help seems to indicate that it should be possible to manipulate it using the Size property of the field.
Any thoughts?
Just occurred to me to add some details. O2K on W2K
References to DAO 3.6, VBA & Access 9.0 Object library already set.
tdf.fields(fld.name).Size = 11
Generates a 3219 error
Code:
Public Sub modtables()
Dim dbs As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Set dbs = CurrentDb()
For Each tdf In dbs.TableDefs
If tdf.Name = "paper" Then
For Each fld In tdf.Fields
If fld.Name = "wbdate" Then
fld.Size = 11
End If
Next
End If 'Next tdf
Next
End Sub
Mike