sum of selected records in a subform

Hi

I have a filtered continuous subform based on a query with a
calculated field called "charges" and a checkbox "select"
when the checkbox is checked, i need to have a sum for the checked
records in the footer of the subform.

any ideas how i can perform such an action

thanks in advance

0
najimou
4/29/2007 2:15:00 PM
access.forms 6864 articles. 1 followers. Follow

2 Replies
1930 Views

Similar Articles

[PageSpeed] 7

Firstly, rename your field in your table, and change the Name and 
ControlSource of the check box on your form. SELECT is a reserved word, and 
likely to cause you problems.

Assuming you have renamed the yes/no field to IsSelected, you can now place 
a text box in the Form Footer section of your continuous subform, and set 
its Control Source like this:

    =Sum(IIf([IsSelected], [Charges], 0)

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"najimou" <ijandaroum@hotmail.com> wrote in message
news:1177856100.617219.7010@u30g2000hsc.googlegroups.com...
>
> I have a filtered continuous subform based on a query with a
> calculated field called "charges" and a checkbox "select"
> when the checkbox is checked, i need to have a sum for the checked
> records in the footer of the subform.
>
> any ideas how i can perform such an action
>
> thanks in advance 

0
Allen
4/29/2007 3:30:31 PM
On Apr 30, 1:30 am, "Allen Browne" <AllenBro...@SeeSig.Invalid> wrote:
> Firstly, rename your field in your table, and change the Name and
> ControlSource of the check box on your form. SELECT is a reserved word, and
> likely to cause you problems.
>
> Assuming you have renamed the yes/no field to IsSelected, you can now place
> a text box in the Form Footer section of your continuous subform, and set
> its Control Source like this:
>
>     =Sum(IIf([IsSelected], [Charges], 0)
>
> --
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users -http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "najimou" <ijandar...@hotmail.com> wrote in message
>
> news:1177856100.617219.7010@u30g2000hsc.googlegroups.com...
>
>
>
> > I have a filtered continuous subform based on a query with a
> > calculated field called "charges" and a checkbox "select"
> > when the checkbox is checked, i need to have a sum for the checked
> > records in the footer of the subform.
>
> > any ideas how i can perform such an action
>
> > thanks in advance

Worked Perfectly, and thanks very much for your help


0
najimou
4/30/2007 4:27:05 AM
Reply:

Similar Artilces:

How to perform sum sum sum...
How to perform sumation within that particular item but the item is not unique...means item 1 has its own quantity and same goes to item 2...but in the same table... -- Message posted via http://www.accessmonster.com On Tue, 17 Apr 2007 05:28:12 GMT, "EMILYTAN via AccessMonster.com" <u33296@uwe> wrote: >How to perform sumation within that particular item but the item is not >unique...means item 1 has its own quantity and same goes to item 2...but in >the same table... Group By the item. For a more detailed answer, please post a more detailed question (with a des...

Selecting font and style
I am a newbie to the publisher and to publishing in general. I need a recommendation on what font and font size to use for a newsletter body? I realize it is a personal preference choice but I was wondering if there are maybe like 3 or 4 fonts most commonly used as Body Text. In my Word documents I mostly use Times New Roman but I am not sure if it is a good choice for a newletter Thank you in advance for any suggestions On Mon, 16 Feb 2004 08:21:08 -0800, "Dimitry" <anonymous@discussions.microsoft.com> wrote: >I am a newbie to the publisher and to publishing in ge...

Multiple variables to sort and sum, return values<0 with sum refer
Can anyone help me with this one please? I have this table of data. I'd like to be able to write a formula(s) which sums the No according to date and code, but then only returns a sum value (with the code and date in the two adjacent cells) if there is a value greater than 0. Code Ref No Date 1 G/032/05/999 400600 212 19/03/2010 2 G/032/03/001/999 400500 50 19/03/2010 3 G/032/02/001/001 400400 170 19/03/2010 4 G/032/05/999 400600 315 19/03/2010 5 G/032/03/001/999 400500 300 19/03/2010 6 G/032/05/999 400600 202 19/03/2010 7 G/032/03/001/002 40...

Date-range specific report with counted results of combo box selections
Hi there, I'm a novice with Access, but am currently setting up a patient database for an NGO in India that I'm volunteering with. The primary reason for the database is to collect statistics quarterly. It is a simple database with one table that collects patient data from simple forms with some fields having combo boxes. Ultimately I want to generate reports that will show a summary of 'counts' of various fields for a given period. For example: In the table I have a combo box for where the person came from, with several options including - "Pick up Y. Bazar", &quo...

Click to Open Record from an Unbound Text Box
Hi All, Getting close I think. I have an unbound text box on a subform that lists items from a table (tblSENEIncidentLog2008). The subform is on my Main Form. I am trying to make it so when I click on an item from my ListBox, it loads the form and goes to that record. Right now, when I click on an item on the subform FROM MY MAIN MENU, it opens the form, but it only goes to the FIRST record of the form and shows Filtered. When I click on it with JUST the subform open, it seems to work fine. This is what I have in my List box (ListSAR) on the subform: In the After Update: Private S...

Summing up user defined results
Hi all - I'm new to VBA programming in Excel and so any help i'd totally love! I'm currently writing a function. Objective: user can select rows (do not have to be sequential). User clicks on button. UserForm appears with summed results from ONLY rows that he selected. What I have now, well it doesn't work: Sub Button6_Click() Dim i As Integer Dim totalNumbers As Integer Dim aRange As range For Each a In Selection.Areas 'MsgBox "Area " & i & " of the selection contains " & _ ' a.Rows.Count & " rows." &...

sum subform to form
=Sum([Forms]![frmCamPledgeList].[frmCamPledgeListSub].[Amount Pledged]) Form (frmCamPledgeList) with subform frmCamPledgeListSub). Subform has a field named Pledge Amount. I want to put a field on the form that gives me a total of the subform's Amount Pledged. I have tried the above, but I get an #error in the unbound text box. Do you need any more info? Any thoughts on why this does not work? Thanks in advance, Scott -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200912/1 The proper syntax is =Sum([Forms]![frmCa...

Calculate sum of a field within the query
I have a query that returns the details for a failure record during a specified time period. Where if I search between 1/1/08 and 1/31/08 the query returns the records of all failure records during that period. The row shows the part number and the total parts failed for that record. I need the query to then sum the total part failures for the previous 12 months. So I would see the following: Record # | part # | parts failed | Origination Date| Total Parts failed past 12 months 44444 | x | 4 | 1/2/08 | 200 44445 | Y |1 ...

Dialog Box Wont Dissapear Before Continuing Selection Macro
Hi Can Someone Help? I have a sreadsheet that runs a dialog box as a menu for navigation. Within the disalog box are about 30 buttons each either taking the user to another sheet or running another macro. In all of the macros linked to each button in the menu I have placed the following as the first command: ThisWorkbook.DialogSheets("MenuDialog").Hide I have ensured that the "name" is correct. The macros will sometimes bring up a further dialog or msgbox, but the original MenuDialog box does not dissapear as requested before the second box or action takes place. ...

=SUM Ranges Do Not Update
I have a Excel 2000 spread sheet, with the following macro to insert new row. Sub InsertRow() ' ' Macro1 Macro ' Macro recorded 4/27/2004 ' 'GoTo label, MyString ActiveSheet.Unprotect Application.Goto Reference:="MyCell" ActiveCell.Select ActiveCell.EntireRow.Insert ActiveCell.Offset(-1, 0).Select ActiveCell.EntireRow.Copy ActiveCell.Offset(1, 0).Select ActiveCell.PasteSpecial xlPasteAll Application.CutCopyMode = False ActiveCell.Select ActiveSheet.Protect DrawingObjects:=True, Contents:=True Scenarios:=True End Sub The problem is that in the "Mycell&qu...

MX record #4
what is this MX record and why and how we use this , please elaborate -- Amit Luthra MX record is a DNS entry that tells SMTP servers on the internet (ie any external mail) where to send email for an email domain (ie the right side after the @ on your email address). Without this you would be able to send but not receive external email. When someone replies to your email their SMTP server would not know where the email domain is and bounce the message. Usually there are two MX records with different cost factors ie 10 and 20. So that if one server is down or offline the other one as secon...

Prevent sequential number being used if record not saved
I have an invoice form that when opened, uses the following code to allocate the next invoice number (InvNo): Private Sub Form_BeforeInsert(Cancel As Integer) Me.InvNo = Nz(DMax("[InvNo]", "[tblInvoices]")) + 1 Me.Dirty = False End Sub Trouble is, if I then decide for some reason not to carry on, even if I click on the Close button rightaway without having entered anything anywhere, the invoice number is still used and appears in the Invoices table (without any values in any of the fields, of course). How can I prevent this? Ideally I would like to be able to...

customization of look up records web page dialog
I was wondering whether it is possible to customize the look up records web page dialog as in the page where you can look for an account to associate with a consultant. I wish to add extra values in the "look for" drop down list of this web page to incorporate new entities that I have created, such that you can look for both accounts, consultants, and any other values. Eric did you get an answer on this?? Matthew "Eric" wrote: > I was wondering whether it is possible to customize the look up records web > page dialog as in the page where you can look for an a...

how to make this work if sum=5+n2 then sum becomes the value of s.
I want to get or create a formula in excel or access that allows me to keep a running total of my supplies ie... I have 2 pens, remove one and receive 2. answer in the cell becomes 3 pens then if I zero out the received cell the inventory cell still remembers that I have 3 pens not 4 pens (because I received 2 more pens) and visa versa when I zero out the received cell it remembers I have 3 pens not 1 pen(because I removed 1 pen) I believe the method you suggest is flawed. You have no audit trail. If the number on the sheet doesn't match your actual inventory, how will you figure out...

Sum value between dates problem driving me mad!
Good Evening All, I am really struggling here, have tried, nested IF's including AND's but am a bit stumped. I am fairly familiar with Arrays, but cannot seem to combine all. I have a data table (as detailed below). (Hopefully, this should be 'pastable' into Excel - it works for me) I simply wish to calculate the expected totals per month. Any help & assistance with this would be most welcome. Cheers, Mathew Note, earliest Start is 01/04/03 Start Finish Day Rate Apr-2003 May-2003 Jun-2003 Jul-2003 Aug-2003 01/04/2003 23.00 01/04/2003 09/07/2003 23.00 ...

MSCRM
This is critical functionality that is requested on virtually every engagement. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?mid=372dda86-7e63-404f-b52f-d64c9bc94827&dg=m...

multi selection into separate records?
Hello experts, Is it possible, in a data entry form, for a user to select multiple items in a list control and when he clicks a button to open up a continuous form, parse the selected items and put those values into a separate records? for example, the user selects X, Y, Z in the list for a certain field and pass it to a continuous subform to create 3 separate records as in record1) X record2) Y record3) Z into the field. Is this at all possible? Thanks for your time! ...

Referencing Subform from another form 01-04-10
I have a search form and am trying to pick up data from another form to be displayed in my search form when criteria matches. The search form worked perfectly until I changed the way my database worked and changed some forms. Now I am getting #Name in my text fields of the search form. Some background information regarding my database is that the search form is currently bound to a table risk. I have a data entry form (ptinfo) that has tabs (ptinfo,incident,complaint). The form ptinfo also is bound to table risk. On the incident tab i have a subform occurrence where data is enter...

Conditional Sum Wizard
Currently I am setting up a sheet and I am using the conditional sum wizard for formulas. Once a formula is created the sytem won't let me copy or change a formula. If I try to copy (Copy, paste special) a formula to another cell, the formula won't work anymore. If I create a formula with the wizard and afterwards change one of the parameters, the formula does not work anymore. Can anyone give me a hint on how I can solve these issues? Thanks. Please don't multi-post - you have an answer elsewhere, relating to use of CSE. Pete On Jan 6, 9:23=A0am, MarcoKoenders <MarcoKo...

Next Record in ListBox
Is there an easy way to move to the next record in a list box after the list box has been clicked on? Martin Hi, you can use following code: If Me.MyListbox.ListCount > 0 Then Me.MyListbox.Selected(1) = True end if -- Best regards, ___________ Alex Dybenko (MVP) http://accessblog.net http://www.PointLtd.com "Martin" <Martin@discussions.microsoft.com> wrote in message news:40D2CCF5-0F84-4A49-94F4-6D2E37C8F82F@microsoft.com... > Is there an easy way to move to the next record in a list box after the > list >...

Easy report? How to report on a record, skip, report, etc.
I have a totals query that looks like this: SegmentID LandCost ImpvCost Damages Relo Incidental Demolition 001 $ amt $amt $amt $amt $amt 002 $ amt $amt $amt $amt $amt 003 $ amt $amt $amt $amt $amt 004 $ amt $amt $amt $amt $amt 005 $ amt $amt $amt $amt $amt 006 $ amt $amt $amt $amt $amt 007 $ amt $amt $amt $amt $amt 008 $ amt $amt $amt $amt $amt 009...

Sum Question
I am using Excel 2000 I have the following very simple formula in column j Sheet1 =SUM(B5*H5) I have this copied all the way down to line 40. It shows 0 in all of the cells all the way down. I would like for there to be a way that the cell would not show anything in it UNLESS there was something that it was calculating. For example. I have entered data in column b and column h through line 10, but it still shows 0 in column J all the way down to line 40. I realize that it is showing these 0's b/c I have placed the formula there, but is there a way that it will still calculate but only ...

Sum sum sum
Let me describe my problem... I have a form with with item number with is unique and then i put another form (subform) to linked to record the number of item in and out.... This means a item can have many in and out transactions which make the item number not unique.. My problem is I want to calculate the sum of in quantity within the same item. I want the sum to be keep on increasing when the user enter the quantity. Example user key in 2 then new user key 4 and i want the total quantity to be 6... Please help.... No idea of what i am talking? I will explain... -- Message posted via http:/...

Using DMax with a restricted set of records
In a table "tbl_Projects" I have two fields (amongst others) called Region and SerialNo. I can use DMax to increment SerialNo by one when entering new records Me.SerialNo = DMax("[SerialNo]", "tbl_Projects", "SerialNo") + 1 but I cannot restrict the set of records DMax looks at to a particular region. Any ideas? -- Keith W Keith Woollacott wrote: > In a table "tbl_Projects" I have two fields (amongst others) called > Region and SerialNo. I can use DMax to increment SerialNo by one when > entering new records > > Me.Serial...

Yes/No Update through Select qry
I am thinking I am missing something very elementary, but regardless I'll ask. I have a form which when a user runs a query specific based upon their user id via a command button a list of tasks appear where the Completed field is 0 (ie not compelte) Is there a way that the user can change the value to -1 by simply checking the button on the same query? Currently it shows The recordset is not updateable. Thanks in advance I am releived it wasn't something completely obvious. I took your advice and am still a little confused (actually very confused) so I'll have to look d...