Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DSum Question 1

Status
Not open for further replies.

CluelessRink

Technical User
Jun 5, 2004
53
US
I have a DSum that goes
=DSum("totalsales","tbl_tips"," [transdate] = #" & [transdate] & "#")
And it works wonderfully.

I would like to add another variable to it though, one that will pull the data from another field called dept from the table named tbl_employees.

I've tried
=DSum("totalsales","tbl_tips"," [transdate] = #" & [transdate] & "#","dept","tbl_employees")
but that didn't work.

How would I phrase it?

What I am trying to do is get the total amount of tips by day (transdate) by department (dept).
 
Got it! The problem was in the query, I had the wrong table in there.

It sure helps to have a second mind in the mix to assist.
 
What the!!??

Here's an odd one!

When I run the query, it pull up a bunch of data that isn't even in the table(s).

I've done a compress and repair, but it's still there.

What would cause that?

 
Check carefully how the two tables are joined.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top