I tried this function that creates sql string:
But it doesn't work.Code:Public Function createTableProbaAutoNumber(ByVal tableName As String) As String Dim sql As String sql = "CREATE TABLE " & tableName & " (ID Long Integer PRIMARY KEY AUTONUMBER, Field1 TEXT)" createTableProbaAutoNumber = sql End Function
How can I set a field as AutoNumber with VBA code?
What is the right syntax?