Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field Properties

Status
Not open for further replies.

mans

Programmer
Mar 18, 2000
136
AU
Hello,

I am using VB6 with Access2000. I am also using the code below to append a field called "end" to a table called "Table", the code works fine (ignore declarations). Can somebody please let me know what code I can add so I am able to define the field properties which must include whether: a value for the (new) field is required (defaults to No in Access), a zero length is allowed (defaults to No in Access) and if duplicates are allowed (defaults to Yes in Access).

Set td = daoDB36.TableDefs("Table")
Set F = td.CreateField("end", dbText)
td.Fields.Append F

Thank You
 
Use this code:

Set td = daoDB36.TableDefs("Table")
Set f = td.CreateField("end", dbText)

f.Properties("Required") = True
f.Properties("AllowZeroLength") = True

td.Fields.Append f

[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top