Hi,
I am trying to add a column to a table.
It was working fine and now suddenly i get an error message " Syntax Error in field definition"
Im taking the table Name and the column Name from a Combo box.Code:Dim Sql As String Dim tbl As String Dim col As String Dim rtl As String tbl = Me.Combo67 col = Me.Combo65 Sql = "ALTER TABLE " & [tbl] & " ADD COLUMN " & [col] & " Text(128) " rtl = MsgBox("ADD " & col & " TO " & tbl & " ?", vbYesNo + vbExclamation, "PLEASE CONFIRM") MsgBox Sql Select Case rtl Case 6 DoCmd.RunSQL Sql Case 7 End End Select End Sub
how can I rectify this error??
Thanks!!




Reply With Quote