How could i change an existing field per code? My existing field in the table is called description and i want to change its property from from text to memo.i have a function that creates this field, but i do not now how to change the property from text to memo.Can you help me ?
here is my function for creation of the field :
Public Function CreateFieldsInCustomers()
On Error GoTo ErrProc
' create new fields in table Products
Dim StrPassword As String
StrPassword = "secret"
Dim wsp As DAO.Workspace
Dim dbs As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
Dim prp As DAO.Property
Set wsp = DAO.DBEngine.Workspaces(0)
Set dbs = wsp.OpenDatabase("C:BEstoreBE.mdb", False, False, ";PWD=" & StrPassword)
Set tdf = dbs.TableDefs("TblClients")
'create the field customerid
Set fld = tdf.CreateField("Description", dbText)
tdf.Fields.Append fld
tdf.Fields.Refresh
dbs.Close
Set fld = Nothing
Set tdf = Nothing
Set dbs = Nothing
Set wsp = Nothing
Exit Function
ErrProc:
If Err = 3191 Then
Resume Next
Else
MsgBox Err.Description ' or something else you want
End If
End Function




