Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Table method 1

Status
Not open for further replies.

4321z

Programmer
Oct 21, 2003
45
GB
Trying to use the create table example given in the access help files below

CREATE TABLE FirstTable(FirstName TEXT,LastName TEXT);

and i keep getting a compile error "Expected: End of Statement"

Is this not the method to use to be able to create a table on the fly?
 
From what you've typed it looks as though you are trying to use the SQL create table method. If thats the case you need to enclose the SQL in quotations as a text string and then use the Execute command to action the SQL.

Should look something like this

CurrentDB.Execute "CREATE TABLE FirstTable(FirstName TEXT,LastName TEXT);"

That should have the desired effect

Hope it helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top