E
efandango
I have a query for an address list from two seperate query/tables which have
this kind of setup:
Table: [Qry_Points]
Field: [Run_point_Address]
Data: Main St, W1
11 Main St, W1
South St, E3
49 South St, E3
and from the other table, I have 2 x two concactenated type fields; They are:
Fields:
[FromGetRound] & [From_PostCode]
[ToGetRound] & [To_PostCode]
Query/Table: tblGetrounds
Data: Main St, W1
South St, E3
I have managed to get the first part of my problem solved, but including
fields that also have door numbers has stumped me.
I want to be able to say; Give me all addresses from 'Qry_Points' that exist
in either one or both fields from 'tblGetrounds'; but
the rub is that the addresses in 'Qry_Points' can also have a door number,
whereas the addresses in 'tbl_Getrounds' do not. So How can I include those
addresses with numbers in the query result?
here is my SQL:
SELECT tbl_Getrounds.Run_No, Qry_Points.Run_point_Address, [FromGetRound] &
", " & [From_PostCode] AS FromGetRoundAddress, [ToGetRound] & ", " &
[To_PostCode] AS ToGetRoundAddress
FROM Qry_Points INNER JOIN tbl_Getrounds ON Qry_Points.Run_No =
tbl_Getrounds.Run_No
GROUP BY tbl_Getrounds.Run_No, Qry_Points.Run_point_Address, [FromGetRound]
& ", " & [From_PostCode], [ToGetRound] & ", " & [To_PostCode],
tbl_Getrounds.FromGetRound, tbl_Getrounds.From_PostCode,
tbl_Getrounds.ToGetRound
HAVING (((Qry_Points.Run_point_Address)=[FromGetRound] & ", " &
[From_PostCode] Or (Qry_Points.Run_point_Address)=[ToGetRound] & ", " &
[To_PostCode]));
this kind of setup:
Table: [Qry_Points]
Field: [Run_point_Address]
Data: Main St, W1
11 Main St, W1
South St, E3
49 South St, E3
and from the other table, I have 2 x two concactenated type fields; They are:
Fields:
[FromGetRound] & [From_PostCode]
[ToGetRound] & [To_PostCode]
Query/Table: tblGetrounds
Data: Main St, W1
South St, E3
I have managed to get the first part of my problem solved, but including
fields that also have door numbers has stumped me.
I want to be able to say; Give me all addresses from 'Qry_Points' that exist
in either one or both fields from 'tblGetrounds'; but
the rub is that the addresses in 'Qry_Points' can also have a door number,
whereas the addresses in 'tbl_Getrounds' do not. So How can I include those
addresses with numbers in the query result?
here is my SQL:
SELECT tbl_Getrounds.Run_No, Qry_Points.Run_point_Address, [FromGetRound] &
", " & [From_PostCode] AS FromGetRoundAddress, [ToGetRound] & ", " &
[To_PostCode] AS ToGetRoundAddress
FROM Qry_Points INNER JOIN tbl_Getrounds ON Qry_Points.Run_No =
tbl_Getrounds.Run_No
GROUP BY tbl_Getrounds.Run_No, Qry_Points.Run_point_Address, [FromGetRound]
& ", " & [From_PostCode], [ToGetRound] & ", " & [To_PostCode],
tbl_Getrounds.FromGetRound, tbl_Getrounds.From_PostCode,
tbl_Getrounds.ToGetRound
HAVING (((Qry_Points.Run_point_Address)=[FromGetRound] & ", " &
[From_PostCode] Or (Qry_Points.Run_point_Address)=[ToGetRound] & ", " &
[To_PostCode]));