i have code that checks to see if a column exists in a table; and, if not, adds the column to that table.
in this case the new column data type is text with a field size of 5 characters
the <edited> code is
vFieldName = rsNewFields![newfieldname]
vFieldType = rsNewFields![DataType]
vFieldSize = rsNewFields![FieldSize]
sSQL = "Alter Table tbeFixtureSchedulePrintOptions ADD " & vFieldName & " " & vFieldType & "(" & vFieldSize & ")"
DbNewFields.Execute (sSQL), dbFailOnError
which generates this line of code:
Alter Table tbeFixtureSchedulePrintOptions ADD AIASectionNumber dbText(15)
and results in this error:
3292 syntax error
any thoughts would be greatly appreciated in advance
thnx Mark