Solved

DSum syntax problem

Posted on 2014-02-04
4
267 Views
Last Modified: 2014-02-04
I'm trying to do a DSum using this control source but it isn't working.  What would the correct syntax be?

=DSum("[ReadyQty]","tblReady","[TextMNumber] = " & [Forms]![frmPlanted]![cboTextMnumber.Column(0)])
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:SteveL13
ID: 39832487
Note:

cboTextMnumber.Column(0)]) is a text field.
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 39832585
=DSum("[ReadyQty]","tblReady","[TextMNumber] = " char(34) & [Forms]![frmPlanted]![cboTextMnumber.Column(0)] & char(34) )
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39832587
=DSum("ReadyQty","tblReady","TextMNumber = " & Forms!frmPlanted!cboTextMnumber.Column(0))

Open in new window


You don't need all the square brackets, but your syntax actually looked good.  Double check field names
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39832595
-->>> cboTextMnumber.Column(0)]) is a text field.

Whoops - Guy is correct.  You need quotes.

But his Char(34) should be Chr(34)    -- no points please.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question