Maybe it is time to post the dB for analysis? Do a Compact & Repair, then compress it (Zip).
Maybe it is time to post the dB for analysis? Do a Compact & Repair, then compress it (Zip).
did you try the suggestions in post #12?
I tried something new. I modified the old excel file (added the two new fields to excel and to the query that exports the data) and works! Why?
The excel file still needs mods because the person who set it up changed calculations and exports on other sheets. I will try modifying the excel file so that the calculation sheets use the new data. I just can't understand why I couldn't upload the new data to his modified excel file. Layout is the same except for the two added fields.
Hmm, try exporting to a new excel file, not yet created.I tried something new. I modified the old excel file (added the two new fields to excel and to the query that exports the data) and works! Why?
The excel file still needs mods because the person who set it up changed calculations and exports on other sheets. I will try modifying the excel file so that the calculation sheets use the new data. I just can't understand why I couldn't upload the new data to his modified excel file. Layout is the same except for the two added fields.
It would appear from what you are saying now, that the fields must match?.
Not heard of that before TBH, but there is a lot I have not heard about.
Edit: I have just tried the same scenario and it works fine for me?
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Embarassing. I finally got it to work. Somehow the export is tied to the name of the old excel file. I can't find where or how, no statement in Access code,. But when I gave the old Excel name to the new Excel file, Access had no trouble exporting.
Thank you all for help. I learned a lot about modern Access while struggling through this.
How can you say that?
It is exporting to whatever is in ExcelFile ?
Though there does appear to be a period before it?
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
You never did post the dB, so it is hard to know what the problem is with the name. Could be an import/export specification. Could be in code somewhere.
But you have found a work-a-round.
Good luck with your project....
I finally got it working. Embarassed to say that the cause was "simple". The name of the excel file had been changed. The excel name I was using-(not sure yet how it is included in the code)-was an old one. Thank all of you much much-I learned a lot.
Only simple when you get to the bottom of it.
This is one which I call 'silly' errors.
If you had stepped back and inspected each part in turn, then it would have been obvious and found.
I asked you what was in ExcelFile back in post #4.
Learn to debug your/or anyone else's code
TBH though, suprised it just did not create a new file by that name?
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
probably did but the OP was looking at the old fileTBH though, suprised it just did not create a new file by that name?
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba