Solved Crosstab Query Parameter problem (1 Viewer)

KINGOFCHAOS17

Member
Local time
Today, 06:10
Joined
Mar 20, 2020
Messages
31
Hello all. In need of your assistance please. I've got a crosstab query where I want to pull the date start and end parameters from a table (TAQDate) however keep receiving an SQL statement error because it contains ambiguous outer joins. Screenshot of the query attached.

I wanted to have the start and end dates stored in a simple table as they're used elsewhere on multiple other queries than run in conjunction with this one I'm having problems with.

Where am I going wrong?
 

Attachments

  • Crosstab Query.jpg
    Crosstab Query.jpg
    195 KB · Views: 89

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:10
Joined
Oct 29, 2018
Messages
21,322
Hi. Maybe try removing the parameter table from the query and use DLookup() instead.
 

KINGOFCHAOS17

Member
Local time
Today, 06:10
Joined
Mar 20, 2020
Messages
31
Thanks, how would I do this?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:10
Joined
Oct 29, 2018
Messages
21,322
Thanks, how would I do this?
So, first of all, take out the TAQDate table from your query and also remove the Where column and run your Crosstab query to make sure it works. If it does, then you could add the Where column back in but use DLookup() instead. For example:

Between DLookup("TAQStart","TAQDate") And DLookup("TAQEnd","TAQDate")

Try the above first, but you may also have to use the Format() function to make it actually work.
 

Users who are viewing this thread

Top Bottom