Can you try running this query (changing table/field names as appropriate) and see if that's it? I'll edit this answer later when we establish this is what you wanted to achieve. ;)
SELECT
Table2.Date,
Table1.Country,
Table1.[Campaign name],
Table2.[Track Code],
Table2.[Reg ID],
Table3.Clicks
FROM
Table3 INNER JOIN
(Table2 INNER JOIN Table1 ON Table2.[Track Code] = Table1.[Track Code]) ON
Table3.[Campaign name] = Table1.[Campaign name]
ORDER BY Table2.Date, Table1.Country, Table1.[Campaign name];
- Copy this example SQL query above,
- open your Access database,
- click on Queries tab,
- click on New icon,
- select Design View,
- close the Add tables dialog,
- click on the SQL button (top left),
- paste this code,
- change names as needed,
- click on the red exclamation point (Run) icon,
- come back with your findings...
;)
EDIT: I've added sorting at the end of the query. You can of course change the sorting order by swapping fields listed in the ORDER BY clause, add some more, omit some, and if you want them to sort in descending order, add DESC at the end of the field name, separated by a space (e.g.: ORDER BY Table2.Date DESC, Table1.Country
to have records sorted first by Date in descending order, and then by Country in ascending order ASC
that is a default sorting order).
I also suggest you have a look at the built-in query builder (Design View
) after you're done editing the SQL syntax. You'll find it's rather useful to build your own queries fast. Copied SQL clause will give you a nice example in how tables are related one to another in the WYSIWYG
query builder. You can of course also change all the relations, sorting orders, display orders,... by simply moving things around. ;)