G
Guest
I had a heck of a time trying to figure out why this error occurred, and now
that I have a work around solution, I have to ask: Why did this happen in the
first place?
Following is the situation: I had a simple crosstab query saved in an Access
2000 database. The SQL was fine, I could view the results with no issues.
However, if I tried to use the DoCmd.OutputTo command in my code to export
the results of this query into Excel, I received the following error message:
Error 2329: To create a crosstab query, you must specify one or more Row
Heading(s) options, one Column Heading option, and one Value option.
Everything was correct, and I poured many unnecessary hours trying to figure
out why this would not work. I stumbled on my work around seemingly by
accident when trying to recreate the error with different data in a different
database.
Essentially, when I wrote the query I did it in the Access SQL view.
However, if I change that same query to Design view, and hit Save, the
OutputTo command runs with absolutely no problems, and I get my results in
Excel. If I open the query back up, switch to SQL view, and hit Save,
OutputTo resorts to the above error message again. The only change was what
view Access displayed my query when I clicked Save.
This boggles me greatly, and the only reasoning I can come up with is an
Access glitch in how it saves the query. Thankfully I'm up and working now,
but I want to understand why I got this error, and determine if there is a
more fundamental problem I may be overlooking. Does anyone have more solid
evidence to explain this issue?
that I have a work around solution, I have to ask: Why did this happen in the
first place?
Following is the situation: I had a simple crosstab query saved in an Access
2000 database. The SQL was fine, I could view the results with no issues.
However, if I tried to use the DoCmd.OutputTo command in my code to export
the results of this query into Excel, I received the following error message:
Error 2329: To create a crosstab query, you must specify one or more Row
Heading(s) options, one Column Heading option, and one Value option.
Everything was correct, and I poured many unnecessary hours trying to figure
out why this would not work. I stumbled on my work around seemingly by
accident when trying to recreate the error with different data in a different
database.
Essentially, when I wrote the query I did it in the Access SQL view.
However, if I change that same query to Design view, and hit Save, the
OutputTo command runs with absolutely no problems, and I get my results in
Excel. If I open the query back up, switch to SQL view, and hit Save,
OutputTo resorts to the above error message again. The only change was what
view Access displayed my query when I clicked Save.
This boggles me greatly, and the only reasoning I can come up with is an
Access glitch in how it saves the query. Thankfully I'm up and working now,
but I want to understand why I got this error, and determine if there is a
more fundamental problem I may be overlooking. Does anyone have more solid
evidence to explain this issue?