Query doubling values

H

Harry Bo

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
 
V

Van T. Dinh

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.
 
N

Nick

I am guessing this table is linked to another table in
your database and the link is configured incorrectly.
 
H

Harry Bo

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
 
V

Van T. Dinh

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

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

Check Access Help on Totals Query.
 
R

rpw

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top