BlondeBimbo
New member
- Local time
- Today, 11:42
- Joined
- Feb 5, 2021
- Messages
- 9
I am struggling to create a query in access.
I have two tables say “Things” which contains the fields, Moved, fromCustomer and ToCustomer
with a couple of entries such as
bananas (moved) Customer1 (fromCustomer) Customer2 (ToCustomer)
apples (moved) Customer3 (fromCustomer) Customer1 (ToCustomer)
And a “ Customers” table which has fields Name and Location
With entries
Customer1 (Name) London (location)
Customer2 (Name) Manchester (location)
Customer3 (Name) Liverpool (location)
(It’s a test DB as the real tables are much more involved of course)
I am trying to build a query using query builder and design view to basically output three fields:
The item moved (from the moved field);
The Location (obtained from the customer table) of the customer identified in the fromCustomer;
And the location (obtained from the customer table) of the customer identified in the ToCustomer
as so:
Bananas (moved) London Manchester
Apples (moved) Liverpool London
I appear to be able to join the table based on one of the “customers” but can’t get the second to work and visa versa I can only get the results:
Bananas London London
Bananas Manchester Manchester
Could anyone help – it seams such an obvious requirement yet I can’t find anything that works when searching
I have two tables say “Things” which contains the fields, Moved, fromCustomer and ToCustomer
with a couple of entries such as
bananas (moved) Customer1 (fromCustomer) Customer2 (ToCustomer)
apples (moved) Customer3 (fromCustomer) Customer1 (ToCustomer)
And a “ Customers” table which has fields Name and Location
With entries
Customer1 (Name) London (location)
Customer2 (Name) Manchester (location)
Customer3 (Name) Liverpool (location)
(It’s a test DB as the real tables are much more involved of course)
I am trying to build a query using query builder and design view to basically output three fields:
The item moved (from the moved field);
The Location (obtained from the customer table) of the customer identified in the fromCustomer;
And the location (obtained from the customer table) of the customer identified in the ToCustomer
as so:
Bananas (moved) London Manchester
Apples (moved) Liverpool London
I appear to be able to join the table based on one of the “customers” but can’t get the second to work and visa versa I can only get the results:
Bananas London London
Bananas Manchester Manchester
Could anyone help – it seams such an obvious requirement yet I can’t find anything that works when searching