Dsum Problem

pinkpanther6666

Board Regular
Joined
Feb 13, 2008
Messages
193
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I've got a dsum problem and hoping somebody could help me please

2 Tables set up as below

tblmain

Week,Team,Player,DS,DD

tblFixtures

Week,Team,HDa,AWa

HDa is Home Darts
AWa is Away Darts

frmFixtures

What i need to do is for the Fixtures form textbox called HDa to have a total of [DS] + [DD/2] pulling the data from tblmain based on the values of Week and Team in frmfixtures


Many Thanks in Advance


Steve
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hi All,

In the Control source for the Home team HDa ive Tried the following and doesnt work

=DSum([DS]+[DD]/2,"Main","[Week] = " & [Week] And "[HomeTeam] = " & [Team])

Can Anyone help please

Cheers


Steve
 
Upvote 0
Is there a reason you cannot link the two tables together in a query, and do the calculations there, and then just use the query as the Data Source of your form?
Whenever possible, I recommend doing most of the calculations in an underlying query instead of on the form itself.
 
Last edited:
Upvote 0
Joe

Ive tried using

=DSum([Total],"qry123","[Week] = " & [Week] And "[HomeTeam] = " & [Team])

and still returns #Name

Hope you can help


Steve
 
Upvote 0
If you join your tables together properly, you should not need to use a DSUM formula at all.
If you post some sample data of what your tables look like along with your expected results, we can help you structure the query to do that.
 
Upvote 0
Hiya Joe

Table structures are



tblmain


Week,Team,Player,DS,DD

tblFixtures

Week,Team,HDa,AWa

HDa is Home Darts
AWa is Away Darts


Expected results are

Week,Home Team,Pts,Away Team,Pts

1,Team1,7,Team2,5
1,Team3,3,Team4,9
1,Team5,1,Team6,11


Hope this Helps and many thanks for your help


Steve





 
Upvote 0
Joe and All

Tried this but still doesnt work


=DLookUp([Total],[qry123],"Week =" & [qry123].[Week] And "Team =" & [qry123].[HomeTeam])


Regards

Steve
 
Upvote 0
The whole point of including all the needed tables in a query is so that you do NOT need to use DSUM and DLOOKUP functions. You use DSUM and DLOOKUP when the table/query you need is not included in the data source.

I was hoping for a little more detail/real examples of your data. Note that you can Copy and Paste from Table/Query results windows here, like this:
IDReceipt TotalMyNameMyDate
000110Joe1/1/2016
000111Jim2/1/2016
000220Bob
000430
4/1/2016
000540Joe6/1/2016

<caption> Table1 </caption><thead>
</thead><tbody>
</tbody><tfoot></tfoot>

If you could do this for the two underlying Tables that are involved, that would be very helpful. Then your expected output would make more sense (assuming that the expected output you post can be derived from your data examples).
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,093
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top