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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error using variable in sql statement

Status
Not open for further replies.

tar28un

Technical User
Nov 29, 2005
58
GB
Hi there,

I am getting error in executing the following command .Can anybody help. I want to use the variable value as the filename.

tablename = "file"

str1 = "Create table" & tablename & "(URN int,Forename varchar(255),Surname varchar(255),Date_of_birth date,House_name varchar(255),House_number varchar(255),Road varchar(255),Postcode varchar(255),Number_of_sessions_claimed_per_week int,Number_of_weeks_claimed_max_14_weeks int,Total_number_of_sessions_claimed_max_55_sessions int,SEN_Funded int)"

DoCmd.RunSQL (str1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top