H
Harry Bo
Hi,
I have tried explaining this problem before without success, so I'll try again.
TblTransactions
From Suburb
To Suburb
Service
Items
Kilos
TblPostcode
Suburb
Direct Port
QryTo
generates the direct port.....To
QryFro
generates the direct port....from
QryRFP
takes the "To" & "From" direct ports and sums the items and kios
This works fine until I have:
A multiple suburb to suburb.....Mel to Syd ( if there are 2 entries, the result for items & kilos are doubled)
or I have same suburb to suburb Mel to Mel this seems to multiply by 4.
What am I doing wrong...this is the sql view:
SELECT QryFro.[Direct Port] AS [From], QryTo.[Direct Port] AS [To], Sum(TblTransactions!Items) AS Items, Sum(TblTransactions!Kilograms) AS Kilograms
FROM (QryFro INNER JOIN TblTransactions ON QryFro.[From Suburb] = TblTransactions.[From Suburb]) INNER JOIN (QryTo INNER JOIN [To Suburb] ON QryTo.[To Suburb] = [To Suburb].SubPost) ON TblTransactions.[To Suburb] = [To Suburb].SubPost
GROUP BY QryFro.[Direct Port], QryTo.[Direct Port];
Help!
harry
I have tried explaining this problem before without success, so I'll try again.
TblTransactions
From Suburb
To Suburb
Service
Items
Kilos
TblPostcode
Suburb
Direct Port
QryTo
generates the direct port.....To
QryFro
generates the direct port....from
QryRFP
takes the "To" & "From" direct ports and sums the items and kios
This works fine until I have:
A multiple suburb to suburb.....Mel to Syd ( if there are 2 entries, the result for items & kilos are doubled)
or I have same suburb to suburb Mel to Mel this seems to multiply by 4.
What am I doing wrong...this is the sql view:
SELECT QryFro.[Direct Port] AS [From], QryTo.[Direct Port] AS [To], Sum(TblTransactions!Items) AS Items, Sum(TblTransactions!Kilograms) AS Kilograms
FROM (QryFro INNER JOIN TblTransactions ON QryFro.[From Suburb] = TblTransactions.[From Suburb]) INNER JOIN (QryTo INNER JOIN [To Suburb] ON QryTo.[To Suburb] = [To Suburb].SubPost) ON TblTransactions.[To Suburb] = [To Suburb].SubPost
GROUP BY QryFro.[Direct Port], QryTo.[Direct Port];
Help!
harry