Hi there,
I am trying to create a small aplication which first ask the user to select some excel files which he wants to import and then import those excel files into access. My problem is that when the file gets imported into access, it dont have the proper datatypes. So what I want to do is create a table in access first and set the datatypes of the fields to what I want them to. I am trying to use the create table command but I am not able to do so...The command I am using is:
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)
I am trying to create a small aplication which first ask the user to select some excel files which he wants to import and then import those excel files into access. My problem is that when the file gets imported into access, it dont have the proper datatypes. So what I want to do is create a table in access first and set the datatypes of the fields to what I want them to. I am trying to use the create table command but I am not able to do so...The command I am using is:
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)