Hi Guys,

Is it possible to dynaically create table name in MS Access:

Below is my CODE:

strSQL = "CREATE TABLE" + Me.Text + "( ID Counter," & _
"Name TEXT(50) NOT NULL," & _
"PRIMARY KEY(ID) )"

But,im getting a run time error that syntax is wrong.
Appreciate your help!

this is the general syntax for creating tables

CREATE TABLE
[ database_name . [ schema_name ] . | schema_name . ] table_name
( column_name <data_type> [ NULL | NOT NULL ] [ ,...n ] )

so using your code to create a sample table(even though i don't know what you want to call the table from your code so am using 'personel')

CREATE TABLE Personel
 (ID INT NOT NULL,
  Name VARCHAR(40) NOT NULL)

Thanks for ur reply ..i got it..