I am trying to modify field size of the data type in an new column in an Access table using Excel VBA. I have the following code that works:
InsertDataCommand = "ALTER TABLE " & TableName & " ADD COLUMN " & ColumnName & " "
Select Case DataType
Case Is = "TEXT"
InsertDataCommand = InsertDataCommand & DataType & "(" & DataLength & ")"
Case Is = "NUMBER"
InsertDataCommand = InsertDataCommand & DataType
End Select
AccessObject.CurrentProject.Connection.Execute (InsertDataCommand)
My issue is some of my numbers require a Double format and some require a Long Integer format. I can not find any documentation for how to specify that like I can with the TEXT field length. Any thoughts?