This is probably dead simple, I have always been used to writing vba for Access Xp (haven't done so for a few years) etc where
Dim db as database
Dim rs as recordset
Set db = Currentdb
Set rs = db.CreateTableDef (sorry your correct)
etc
etc
but I cannot seem to do this anymore in 2010.
I am trying to take information from an excel spreadsheet, import into database (can do that manually)
For ease of understanding I have attached an test excel.xls which shows the format of the data before and the resulting code after.
This code is needed to create a table with first column being "Number" and then as many columns as there are unique codes, there may be over 11,000 rows in the input.
(headings will change dependant on input Code names hence the creating new table requirement)
There then needs to be 1 "Number" per row each being unique and the "Result" in the field under its related Code.
I know this could probably done in Excel as well but this is an Access forum.
I only really need help in the code for creating the Table and adding the fields name for each column.
Thanks in advance.
Dim db as database
Dim rs as recordset
Set db = Currentdb
Set rs = db.CreateTableDef (sorry your correct)
etc
etc
but I cannot seem to do this anymore in 2010.
I am trying to take information from an excel spreadsheet, import into database (can do that manually)
For ease of understanding I have attached an test excel.xls which shows the format of the data before and the resulting code after.
This code is needed to create a table with first column being "Number" and then as many columns as there are unique codes, there may be over 11,000 rows in the input.
(headings will change dependant on input Code names hence the creating new table requirement)
There then needs to be 1 "Number" per row each being unique and the "Result" in the field under its related Code.
I know this could probably done in Excel as well but this is an Access forum.
I only really need help in the code for creating the Table and adding the fields name for each column.
Thanks in advance.
Attachments
Last edited: