Solved

DSum syntax problem

Posted on 2014-02-04
4
260 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
  • 2
4 Comments
 

Author Comment

by:SteveL13
Comment Utility
Note:

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

Accepted Solution

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

Expert Comment

by:mbizup
Comment Utility
=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
Comment Utility
-->>> 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now