God, I hope someone can explain this to me or help me sort it out - it's been the bain of my existence for two solid days now.
I have written some code in Excel that cuts up a large spreadsheet and splits the data between two other spreadsheets. This all works fine. the code then saves and closes the spreadsheets.
The problem lies with the link tables I have created in Access (97). It doesn't matter how I sort the data in the two spreadsheets, the link tables randomly return the columns in either the wrong order or, even though the column titles are always at the top of the spreadsheets, the titles are placed within the data and a random line of data replaces the column titles! Funnily enough, when I import the spreadsheets as static data, they come through exactly how they appear in Excel.
I have no idea how to sort this problem out as I have tried (I think) pretty much everything to provide a solution. this is what I have tried:
1. Re-running the code from start to finish, deleting the 'corrupt' link tables and re-linking to them.
2. Saving the spreadsheets as text files and linking to these instead.
3. Ignoring the corruption and using append queries to append the data to a static table. Similiarly, I have used make table queries using the corrupt link tables.
It doesn't matter what I do, the data within the link tables is all over the place. Sometimes the some of the column headers will be correct and others will be data within the table.
I'm sure you can all see my frustration!!
This project is huge and it's my first within my new role, so it's pretty important personally and professionally. You lot have never once let me down and I'm grateful beyond words. Please help me this time...
Rich
I have written some code in Excel that cuts up a large spreadsheet and splits the data between two other spreadsheets. This all works fine. the code then saves and closes the spreadsheets.
The problem lies with the link tables I have created in Access (97). It doesn't matter how I sort the data in the two spreadsheets, the link tables randomly return the columns in either the wrong order or, even though the column titles are always at the top of the spreadsheets, the titles are placed within the data and a random line of data replaces the column titles! Funnily enough, when I import the spreadsheets as static data, they come through exactly how they appear in Excel.
I have no idea how to sort this problem out as I have tried (I think) pretty much everything to provide a solution. this is what I have tried:
1. Re-running the code from start to finish, deleting the 'corrupt' link tables and re-linking to them.
2. Saving the spreadsheets as text files and linking to these instead.
3. Ignoring the corruption and using append queries to append the data to a static table. Similiarly, I have used make table queries using the corrupt link tables.
It doesn't matter what I do, the data within the link tables is all over the place. Sometimes the some of the column headers will be correct and others will be data within the table.
I'm sure you can all see my frustration!!
This project is huge and it's my first within my new role, so it's pretty important personally and professionally. You lot have never once let me down and I'm grateful beyond words. Please help me this time...
Rich