Query doubling values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have a table with fields thus:

From To Items Kilos Charge

Mel Syd 5 25 27.50
Mel Bne 3 11 12.5
Mel Syd 3 5 22.50

When I run the query it gives me Mel - Syd 16 (items) 60 (Kilos) 100 (Charge)

What am I doing wrong?

Harry
 
We can't see your Query and don't know what you are trying to do ...

Post what the Query is supposed to do and the SQL String of your Query.
 
I am guessing this table is linked to another table in
your database and the link is configured incorrectly.
 
Ok sorry,

What I'm trying to do is total all the mel to syd items , kilos and costs.

The query I'm using groups the mel and the syd and sums the other 3 fields.

Hope that helps.

Harry
 
.... and the SQL String of the Query???

It sounds you need a Totals ("GROUP BY") Query...

Check Access Help on Totals Query.
 
Hi Van T. Dinh, Harry Bo

Van - Harry had started another thread and I explained how to post the SQL. He responded so I'm posting his response back to this original thread. Maybe with this info you can help him?

Ok my tables are:
tblTransactions
TransID
FromSuburbID
ToSuburbID Service
QtyItems
Kilos
Charge

tblPostCodes
SuburbID
Postcode
DirectPort
I have 2 postcode tables , one for the From's and one for the To's

<snip>

The SQL for the query is:
SELECT QryFro.[Direct Port] AS [From], QryTo.[Direct Port] AS [To], TblTransactions.Service, TblTransactions.Items, TblTransactions.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
WHERE (((TblTransactions.Service) Like "A*"));

Hope this helps, thanks again

Harry
 
Back
Top