Trying to create a primary key within a DAO access database from within VB
2005
The following code works but only if I turn off option strict
The line idxDesignTable. Fields.append(f ldDesignIndex) is the source of the
problem.
Does anyone have an idea how I can recode to avoid the late bound issue
Thanks
Mike
'
'Create Primary Key Index Field
Dim idxDesignTable As Index
idxDesignTable = DesignTable.Cre ateIndex("KeyID " & "index")
Dim fldDesignIndex As Field
fldDesignIndex = idxDesignTable. CreateField("Ke yID", dbLong)
idxDesignTable. Fields.append(f ldDesignIndex) 'This line is the eror source
idxDesignTable. Primary = True
DesignTable.Ind exes.Append(idx DesignTable)
'
2005
The following code works but only if I turn off option strict
The line idxDesignTable. Fields.append(f ldDesignIndex) is the source of the
problem.
Does anyone have an idea how I can recode to avoid the late bound issue
Thanks
Mike
'
'Create Primary Key Index Field
Dim idxDesignTable As Index
idxDesignTable = DesignTable.Cre ateIndex("KeyID " & "index")
Dim fldDesignIndex As Field
fldDesignIndex = idxDesignTable. CreateField("Ke yID", dbLong)
idxDesignTable. Fields.append(f ldDesignIndex) 'This line is the eror source
idxDesignTable. Primary = True
DesignTable.Ind exes.Append(idx DesignTable)
'
Comment