Solved Crosstab Query Parameter problem (1 Viewer)

KINGOFCHAOS17

New member
Local time
Today, 23:09
Joined
Mar 20, 2020
Messages
27
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: 46

theDBguy

I’m here to help
Staff member
Local time
Today, 15:09
Joined
Oct 29, 2018
Messages
17,112
Hi. Maybe try removing the parameter table from the query and use DLookup() instead.
 

KINGOFCHAOS17

New member
Local time
Today, 23:09
Joined
Mar 20, 2020
Messages
27
Thanks, how would I do this?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 15:09
Joined
Oct 29, 2018
Messages
17,112
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