G
Guest
Gurus,
The following "snippet" of code works fine, without the second field
"stuff", however, with the second field "stuff" the last line errors out.
Any ideas?
NewTd.Name = "New Table Name" 'Name new table.
F1.Name = "AU_ID" 'Field 1 is titled "AU_ID"
F1.Type = dbLong 'Filed 1 contains long integers
NewTd.Fields.Append F1 'Add field 1, to the table
F2.Name = "Address" 'Field 2 is titled "address"
F2.Type = dbText 'Field 2 is contains text
F2.Size = 40 'Field 2 contains 40 bytes per entry
NewTd.Fields.Append F2 'Add field 2 to the table
MyDb.TableDefs.Append NewTd 'Add the table to the database
Thanks in advance,
David
The following "snippet" of code works fine, without the second field
"stuff", however, with the second field "stuff" the last line errors out.
Any ideas?
NewTd.Name = "New Table Name" 'Name new table.
F1.Name = "AU_ID" 'Field 1 is titled "AU_ID"
F1.Type = dbLong 'Filed 1 contains long integers
NewTd.Fields.Append F1 'Add field 1, to the table
F2.Name = "Address" 'Field 2 is titled "address"
F2.Type = dbText 'Field 2 is contains text
F2.Size = 40 'Field 2 contains 40 bytes per entry
NewTd.Fields.Append F2 'Add field 2 to the table
MyDb.TableDefs.Append NewTd 'Add the table to the database
Thanks in advance,
David