Sumproductlike in Access

G

Gunti

Hi, excuse me for posting this question for the second time... My last topic
was dead, haven't had a response in 3 weeks.

I'll try to explain exactly what i'm doing.

Two tables
A link between those two tables through 'Contract Number' & 'Sales Doc'
Creating a new query (Query1)

Adding some fields ('Tech Name', 'S Emplcomm name').

Now when i run it, it creates a list of ~ 9000 fields with 'Master
Contract', 'Contractnumber', 'Tech Name' & 'S Emplcomm name')

I want a new field: Amount where Access counts how often 'Contract#' exists
in the query, together with the combination of Tech Name & S Emplcomm name in
the query.
What i've done:

DCount("Master Contract";"[Query1]";"Master Contract=" & [Master Contract] &
" AND [Tech name]=""" & [Tech name] & "") as TheCount

I named my query 'Query1'. It tells me 'As' is an invalid syntax.

Thanks again for everything and i hope i made everything clear!

Gunti
 
D

Douglas J. Steele

Where did you type that?

If it's in an empty cell on the Fields row in the query builder, put
"TheCount:" in front of the DCount statement, rather than "As TheCount"
after it.
 

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