?
Solved

Access Textbox to show a total of a column of certain records

Posted on 2013-11-04
5
Medium Priority
?
1,214 Views
Last Modified: 2013-11-04
I would like to fill in a text box on a form with a query of something like this.  It will keep a tally of the data filled in with the records on the page.  I will have the tally refreshes after a record is updated or added within the form.

SELECT DISTINCTROW Sum([tblTABLE].[COLUMN]) AS [Sum Of COLUMN]
FROM tblTABLE
WHERE (((tblTABLE.ID)=[ID]));

I have this query working in a query.  But I wanted the form to perform a query such as this but limit the sum math to the records that match the ID from a part of the form.

I got this to work as well but this adds all columns in the table, again I only want a sum of records that match a criteria (ID from a place on the form).  =Sum([tblTABLE]![COLUMN])

Help please!  Thank you
0
Comment
Question by:getwidth28
[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
  • 3
  • 2
5 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 39622003
Try this:
= DSum("[Column]", "[Table]", "[ID] = " & [IDFromForm])
0
 

Author Comment

by:getwidth28
ID: 39622017
Right on man!  That done it looks like. Thank you
0
 

Author Comment

by:getwidth28
ID: 39622024
I've requested that this question be closed as follows:

Accepted answer: 0 points for getwidth28's comment #a39622017

for the following reason:

Quick and easy.
0
 
LVL 61

Expert Comment

by:mbizup
ID: 39622021
Whoops!  Try closing the question again.  It looks like you marked your own comment as the solution.  You might need to post a comment using the Object Button for the normal closing buttons to appear.
0
 

Author Closing Comment

by:getwidth28
ID: 39622025
Great to work with.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

770 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