I'm using the following line to add a field to a table (.mdb):
conmdb.Execute ("ALTER TABLE tblReportData ADD COLUMN " & FieldName & " String"
I use this many times in a loop but on certain times it falls over. Namely when FieldName="TIME" or FieldNAme="BIT". I can not see ANY reason why this is happening:
Syntax error in field definition
Am I using illegal words that Access reserves for someting else? I dont seem to find any evidence of this though. I can call a field "TIME" in the access tabel design window!
I've entered the error code -2147217900 on the MSDN site with no luck.
Any tips?
elziko
conmdb.Execute ("ALTER TABLE tblReportData ADD COLUMN " & FieldName & " String"
I use this many times in a loop but on certain times it falls over. Namely when FieldName="TIME" or FieldNAme="BIT". I can not see ANY reason why this is happening:
Syntax error in field definition
Am I using illegal words that Access reserves for someting else? I dont seem to find any evidence of this though. I can call a field "TIME" in the access tabel design window!
I've entered the error code -2147217900 on the MSDN site with no luck.
Any tips?
elziko