Adding data to a newly created field
Hi,
I have used the following code to add a new field to a database. Is there a way to stop this field having a Null value but still keep it empty?
Code:
strSQL = "SELECT * FROM cells ORDER BY cell, Proof;"
Set db = OpenDatabase(lblDatabase.Caption, False, False)
Set tbl = db.TableDefs("cells")
' Create and append new Field objects
tbl.Fields.Append tbl.CreateField("Extra", dbText, 20)
Re: Adding data to a newly created field
Try
Code:
Dim NewField As Field
Set NewField = NewDef.CreateField("Extra", dbText, 20)
NewField.AllowZeroLength = False
NewDef.Fields.Append NewField