Does anyone know why I'm getting a 'type mismatch' error on the last line of this code?
I'm using Access 2000.
Dim myDB As Database, myTB As TableDef
Dim myFD As Field
Set myDB = DBEngine(0)(0)
Set myTB = myDB.TableDefs("scores"
' scores is the name of the table I want to add a field to
Set myFD = myTB.createfield("new_field"
I'm using Access 2000.
Dim myDB As Database, myTB As TableDef
Dim myFD As Field
Set myDB = DBEngine(0)(0)
Set myTB = myDB.TableDefs("scores"
' scores is the name of the table I want to add a field to
Set myFD = myTB.createfield("new_field"