Dynamically Build 1 Xtab Qry Based On 6 Xtab Qry's
OK. I'm to my wits end. I work for a nation wide company in the callcenter portion. Each call that comes in, must be assigned a disposition by the agent before they can clear their system to take another call. All this transpires on a desktop app that updates an Oracle database table. I am using Access instead of straight SQL, because in Access I can create "pretty" reports, dump results to Excel, ect...
The dispositions are in a table, 6 rows deep by 11 columns wide. This displays on the agents screen as 6 drop down menus.
What I have set up right now, is 6 crosstab queries that singles out one set of data in the Oracle table each. Then I have another crosstab query that combines all 6 of the previous crosstabs into one result query.
This may sound convoluted, but it works quite nicely. With one major exception. If one of the dispositions is never selected in an entire shift, my final crosstab query freaks out. This is because it was designed to look for every possible disposition for each of the preliminary crosstabs.
An example is, an agent has to call one of our customers back, and there is no answer. No Answer is an one of the dispositions, and is initially pulled by the first preliminary crosstab, as long as any agent selected that disposition at least one time. If No Answer was never selected, the crosstab does not pull that in. The combining crosstab is set to look for No Answer in qryUnreachableXtab.
What I get is Access giving me an error that qryUnreachableXtab.[No Answer] could not be found. If I go in and remove that from the query grid, the combining crosstab works fine. Until the next day, when I have to put No Answer back in and run the query to see what field has no entry, and remove it from the grid, then the next day put that back in, run the query..... see where this is going?
Now I have set up Query By Form qrydef's before. But what I want to know this: Is is possible, to set up a recordset to look at each of my individual crosstabs, see what columns are showing up, then build my combine crosstabs qrydef.
I apologize if this sounds scattered, if anyone needs to see the massive listing of Access SQL statements associated with my 7 queries, I will post it.
Thanks In Advance,