If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
DSum with multiple criteria
What's wrong with this DSum (I'm getting the #Error message):
DSum("[NUMREC]","T06_REC","[ID]=" & [T11_RecBySourceChart]![ID] & " And [Source] ='Mueller'") I need to return the [NUMREC] (number format) from the T06_REC table where the [ID] field matches the [ID] field in T11_RecBySourceChart table (both text format), and the [Source] field (text format) in the T06_REC = Mueller. THANKS!!! -- GD |
#2
|
|||
|
|||
DSum with multiple criteria
On Tue, 25 Aug 2009 12:49:03 -0700, GD wrote:
What's wrong with this DSum (I'm getting the #Error message): DSum("[NUMREC]","T06_REC","[ID]=" & [T11_RecBySourceChart]![ID] & " And [Source] ='Mueller'") I need to return the [NUMREC] (number format) from the T06_REC table where the [ID] field matches the [ID] field in T11_RecBySourceChart table (both text format), and the [Source] field (text format) in the T06_REC = Mueller. THANKS!!! If the ID field is of Text datatype (not "format", that's a different property) you need the syntactically required quotemarks: DSum("[NUMREC]","T06_REC","[ID]='" & [T11_RecBySourceChart]![ID] & "' And [Source] ='Mueller'") Spacing it out for readability (don't do it this way) that's DSum("[NUMREC]","T06_REC","[ID]=' " & [T11_RecBySourceChart]![ID] & " ' And [Source] ='Mueller'") -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|