Calculating text boxes

I'm running a report on how to split up the fee for a band.
Because all members of the band aren't equal (eg road crew work on a fixed 
fee) I have a code allocated to each member.
Members
Crew
Agent
In my query I have calculated a subtotal after the fixed fees are taken out 
and I now want to divide the remainder up amongst the Members equally.
In my report I now have a field [FeeSubtotal] and a calculating text box 
called Text 27 with the control source  =-Sum([Code]="Member")

As an example, when I run the report the field show FeeSubtotal $5170 and 
the Text box showing 4 members. I now need to divide the subtotal by the 
number of members ie $5170/4

My problem is this - I am trying to calculate the share amongst the members 
by using another text box with the control source
=Sum([FeeSubtotal])/([Code]="Member")
I have even tried to use the build event wizard and came up with the control 
source of =Sum([FeeSubtotal])/[Text27]

None of which seem to work.
Can anyone guide me on the correct method please.

Thanks in advance.


0
Utf
2/11/2008 2:36:56 AM
access.reports 4434 articles. 0 followers. Follow

2 Replies
1136 Views

Similar Articles

[PageSpeed] 36

Bill Neilsen wrote:

>I'm running a report on how to split up the fee for a band.
>Because all members of the band aren't equal (eg road crew work on a fixed 
>fee) I have a code allocated to each member.
>Members
>Crew
>Agent
>In my query I have calculated a subtotal after the fixed fees are taken out 
>and I now want to divide the remainder up amongst the Members equally.
>In my report I now have a field [FeeSubtotal] and a calculating text box 
>called Text 27 with the control source  =-Sum([Code]="Member")
>
>As an example, when I run the report the field show FeeSubtotal $5170 and 
>the Text box showing 4 members. I now need to divide the subtotal by the 
>number of members ie $5170/4
>
>My problem is this - I am trying to calculate the share amongst the members 
>by using another text box with the control source
>=Sum([FeeSubtotal])/([Code]="Member")
>I have even tried to use the build event wizard and came up with the control 
>source of =Sum([FeeSubtotal])/[Text27]


Since the FeeSubtotal field has been calculated in the
query, I don't see why you are trying to sum it in the
report.  Why doesn't the expression:
	=[FeeSubtotal] / [Text27]
provide the desired result?

-- 
Marsh
MVP [MS Access]
-1
Marshall
2/11/2008 4:14:37 PM
Thanks Marsh, such a simple solution.
Sometimes I can't see the forrest for the trees.
I appreciate your help.

"Marshall Barton" wrote:

> Bill Neilsen wrote:
> 
> >I'm running a report on how to split up the fee for a band.
> >Because all members of the band aren't equal (eg road crew work on a fixed 
> >fee) I have a code allocated to each member.
> >Members
> >Crew
> >Agent
> >In my query I have calculated a subtotal after the fixed fees are taken out 
> >and I now want to divide the remainder up amongst the Members equally.
> >In my report I now have a field [FeeSubtotal] and a calculating text box 
> >called Text 27 with the control source  =-Sum([Code]="Member")
> >
> >As an example, when I run the report the field show FeeSubtotal $5170 and 
> >the Text box showing 4 members. I now need to divide the subtotal by the 
> >number of members ie $5170/4
> >
> >My problem is this - I am trying to calculate the share amongst the members 
> >by using another text box with the control source
> >=Sum([FeeSubtotal])/([Code]="Member")
> >I have even tried to use the build event wizard and came up with the control 
> >source of =Sum([FeeSubtotal])/[Text27]
> 
> 
> Since the FeeSubtotal field has been calculated in the
> query, I don't see why you are trying to sum it in the
> report.  Why doesn't the expression:
> 	=[FeeSubtotal] / [Text27]
> provide the desired result?
> 
> -- 
> Marsh
> MVP [MS Access]
> 
1
Utf
2/11/2008 8:01:05 PM
Reply:

Similar Artilces:

Calculating Taxes and Making calculations
Hello, Kindly plz tell me how do i go about making some small calculations based on my existing data such as how to compute taxes and do other calculations based on some quantitative data. where exactly do i make modifications on my application??? Kindly help me out. Thanks , swati you can add code in javascript behind dropdowns or piclist fields. One example might be a dropdown which has shipping options ie ups, fedex etc. When you choose one it takes the weight of your package (whcih you enter) then calculates a shipping cost. search the archives of this group at groups.google.com and ...

AfterUpdate code to validate check boxes
To be eligible for a study, a patient has to meet certain criteria. There are 7 things that could prevent the patient from being eligible (e.g., "Patient is ill," "Patient is pregnant," "Patient is on medication," etc.). On a form, these 7 criteria are listed as 7 check boxes (Yes/No fields). The nurse is asked to "check all that apply." If at least one of the 7 boxes is checked, a text box says, "Patient is NOT eligible." If none of the 7 boxes is checked, the text box says, "Patient IS eligible" One way to code this is to create a...

Procedure to calculate distance using latitude/longitude
Does anyone know of a vba procedure for access that will calculate straightline distance using latitude and logitude for 2 points? AJ wrote: > Does anyone know of a vba procedure for access that will calculate > straightline distance using latitude and logitude for 2 points? See: http://groups.google.com/group/microsoft.public.access/msg/6b934b0e580b974b James A. Fortune MPAPoster@FortuneJames.com ...

Insert text in Cell A1 based on keyword criteria
I want to populate cell A1 with specific text (the word "Active") whenever the word "Yes" is found in cells A2:A20. Whenever the word "Yes" is not found in cells A2:A20 I want to leave cell A1 blank. <twlove@ontuet.com> wrote in message news:1150210856.375367.146410@c74g2000cwc.googlegroups.com... >I want to populate cell A1 with specific text (the word "Active") > whenever the word "Yes" is found in cells A2:A20. Whenever the word > "Yes" is not found in cells A2:A20 I want to leave cell A1 blank. =IF(COUNTIF(A2:...

Excel text corrupting problem
Has anyone seen anythink like what is happening in the Excel screenshot below .. http://www.jon-lamb.co.uk/tf_excel.gif The text is corrupting in cells. Its just happening on one PC and in most excel documents on that PC. It seems to happen a lot when cutting and pasting. So far, I've installed all office and windows updates, removed the anti virus software to test. Installed all graphics driver updates. PC spec is XP Pro, Celeron 3.2GHz, 2GB RAM. Office 2003 Any help much appreciated. Rgrds, Jon I believe that the display in XL is more through the Printer Driver than XL itself. T...

How to calculate age of a person?
Hi, I'm struggling to figure this one out. I have a date column and I'd like to be able to calculate the age without doing it in my head. I've tried to do this but am struggling. Any help will greatly appreciated. Thanks Suzanne Visit www.cpearson.com and search for DATEDIFF best wishes -- Bernard V Liengme Microsoft Excel MVP www.stfx.ca/people/bliengme remove caps from email "Grd" <Grd@discussions.microsoft.com> wrote in message news:6BFFD11C-AECB-4837-93B6-D84B6170B975@microsoft.com... > Hi, > > I'm struggling to figure this one out. I have...

EXCEL 2007 Formula to calculate INTEREST only on a 3 month bridge
I am trying to calculate monthly INTEREST ONLY payment on a short term bridge/swing loan. Assuming an interest rate of 2.75%, paid monthly, Also assuming it will be required for a 3-6 month period, amount approx $500,000. Just switched to Excel 2007 but don't seem to be able to calculate using the formula builder. Not sure if it is compounded daily or monthly. You might want to check out the IPMT function. From the XL help file: IPMT(rate,per,nper,pv,fv,type) Rate is the interest rate per period. Per is the period for which you want to find the interest and must...

Due Date Calculated
I need assistance on an expression that allows for the due date of recurring training to be one year from date completed. Details are as follows: I have a form named [frmTRNComplete] based on table named [tblTRNComplete] Form controls are: TRNID (combo box), DateComp (Text Box) , DateNext (text box), Reccuring (check box) I would like the DateNext to be 1 year from DateComp if Reccuring is true and Date next to be blank if Reccuring is false. -- Aloha, Ron A. Ron I'll assume that you want to use the form to calculate the DateNext, and that you are not trying to s...

how to calculate outliers
Google is your friend: http://www.google.com/search?q=calculate+outliers - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "ismhs" <ismhs@discussions.microsoft.com> wrote in message news:035124A0-06FA-4153-932E-6C4E0614F38C@microsoft.com... > ...

Tick Box Size
Hi Is there anyway to change the size of a tick box displayed on a form ????? I have tried everything !! Thanks Tony Nothing built into Access, but see my March, 2004 "Access Answers" column in Pinnacle Publication's "Smart Access". You can download the column (and sample database) for free at http://www.accessmvp.com/DJSteele/SmartAccess.html -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "blake7" <blake7@discussions.microsoft.com> wrote in message news:17844B03-8C7E-41DF-8646-8A7EF404611D@microsoft.com... >...

Calculated field options???
Here's my Data: Country Status --------- ---------- Canada Green Canada Blue Canada Green Canada Green Canada Blue In my pivot table, 'Country' is an item, and 'Status' is my only data field. What I really need to show in my data area is two column of data, one for 'Green' and one for 'Blue'. I tried creating two 'Calculated' fields with the following formulas, but they don't seem to be working: 'CalculatedField1' = IF((STATUS="Green"),1,0) 'CalculatedF...

Unable to edit textbox after importing text
I am having trouble being able to edit text in a textbox after I import text from a csv file. The trouble is that I can't edit the textbox text at all. I can't cut, copy, or paste anything. I am using Visual C# 2010. Has anyone else come across this? "Steve" <sithius92@gmail.com> wrote in message news:04ca0534-1453-4805-beeb-47d53a7bbac3@w31g2000yqk.googlegroups.com... >I am having trouble being able to edit text in a textbox after I > import text from a csv file. The trouble is that I can't edit the > textbox text at all. I can't cut,...

Pop up Box
I need to have a pop up box saying "Correct" if cell A1+B1=2. How can this be done? You can't, not without changing the question a bit. Think about it: Once the user has accepted that message box (say if you supply an OK button and the user hits it), A1+B2 still equals 2; do you want the message box to pop up again? 1) No; you want it to pop up only when A1+B2 BECOMES 2, that is, when one of those two values are changed so that the sum is 2. For that you want a macro; a worksheet function can't do it for you. 2) Yes; you want "Correct" to show...

show text when mouse rolls over hyperlinnk
How do I get a text box and description display when I roll the mouse cursor over text or a hyperlink? Reference: Using Tool Tips in Publisher Web Publications : http://msmvps.com/blogs/dbartosik/pages/81254.aspx If you have more questions about Publisher webs, then post in the web group and we will try to help you there: news://msnews.microsoft.com/microsoft.public.publisher.webdesign DavidF "rm1231" <rm1231@discussions.microsoft.com> wrote in message news:F2004526-4D2F-4ED7-9578-F157F04BED3C@microsoft.com... > How do I get a text box and description display when I r...

tenure calculations
how can I format several dates such as 04/19/2003, 04/01/2004, etc. int a yearly average for the employee tenure -- Message posted from http://www.ExcelForum.com right now say I have my yearly figures in i1-i9. The formula I though would work is =today()-average(i1:i9), but how would i format this to give me yearly read out -- Message posted from http://www.ExcelForum.com Hi djackson! One way is to use YEARFRAC with a third argument of 1 to get your tenures in years and fractions of a year and then average the result. However YEARFRAC does produce some annoying but small errors. Y...

Time Sheet Function to Calculate
I am having some trouble trying to establish a formula that will give me the number of hours worked during the day given the start time say 8.30am with an end time of 5.30pm and say 30 minutes for lunch. For this scenario, total working hours would be eight and a half hours but I need Excel to display this result as 8.30 hours (0.30 being the minutes in the half hour) and not 8.50. Can someone suggest what to do? Typically the layout would be Column A - Start Time say 8.30am Column B - Time in minutes spent at lunch say 30 minutes Column C - End Time say 5.30pm. Column D - the calculati...

Email Pop-up Box
I have Outlook 2000 and have set up Email using the Corporate LAN option. Everytime Outlook checks for mail a box pops up asking to enter the users password. I have checked the services options and all of the relevant information has been entered - i.e. users name / password / remember password (ticked). But still the box keeps coming up everytime it checks for new mail. Very annoying. Any help, please !!! Thanks Matthew Stone. Have you tried the steps mentioned in http://support.microsoft.com/default.aspx?scid=kb;en-us;275465? "Matt Stone" <matt@lee.co.uk> wrote in mes...

Formula to calculate time
I was wondering if anybody knows of a formula to allow you to do calculations based on time. In other words, say I want to put a list of songs on a CD and their durations. Then, I want to add up the durations to get the full time of the CD, or my specific play list. So for example, using the information below: Ghostbusters - Ray Parker Jr. --- 5:23 (Just a guess) Phantom of the Opera Overture --- 3:55 (Another guess) Instead of 8:78, I'd want to see 9:18 Can this be done? Any help would be greatly appreciated. Thank you! -- Have a nice day! ~Paul Express Scripts, Charting the futu...

Combo Box #8
I am trying to duplicate what another person did for consistency but can't figure it out. A Combo Box appears with the black upside-down triangle at the right side of the object. This triangle appears on a printed page just as it appears onscreen. There is another option for a "drop-down box", however, that I can not figure out how to duplicate. A cell appears to just have numbers or text in it, but when the cell is selected the black triangle appears, giving options to select. I can not figure out how to create this in other cells, or even edit the referenced cells which pr...

Form Controls
Is there any way to make the group box borders invisible? I see a setting to not print, but I dont want them visible on scree either. I am using Excel 2002 SP2 Thanks in advance -- Message posted from http://www.ExcelForum.com I don't think you can do this except via code. Hit alt-f11 to get to the VBE hit ctrl-G to see the immediate window type this in and hit enter: activesheet.groupboxes.visible = false This hides all the groupboxes on the activesheet. "MaryM <" wrote: > > Is there any way to make the group box borders invisible? > I see a setting to n...

Insert calculated median field in pivottable
Anyone know how to get a median calculation in a pivot table? I've tried inserting a calculated field but it always sums the calculated field. Thanks, Joel Not supported in a pivot -- Regards, Peo Sjoblom (No private emails please) "Joel Schaefer" <joel@disintegrators.com> wrote in message news:ev4P0Nk6FHA.2616@TK2MSFTNGP15.phx.gbl... > Anyone know how to get a median calculation in a pivot table? I've tried > inserting a calculated field but it always sums the calculated field. > > Thanks, > > Joel > ...

Javascript help, calculation whoes when calculating from a calculation....
I am having a strange issue with Javascript and I cannot see what the issue us? Essentially I need to be able to calculate two values, one is addition and the second is multiplication. I am getting some strange numbers. My code is at the bottom under the ------, here are the details. crmForm.all.estimatedvalue.DataValue = 10 crmForm.all.new_cfp_estrev_nextyr.DataValue = 10 crmForm.all.new_cfp_estrev_yrtwoplus.DataValue = 10 This should make totalestrev = 30, Then its getting weird, I am taking the following formula (10/100)*30 = 270? Here 10 is the value selected from the drop down value, I ...

Calculating Employee hours for the current week
Hello, I am new to excel and have been assigned the task of creating a file that breaks down the amount of time each of our employees spends on different projects. Most importantly I want to create a rollup sheet that shows the total number of hours all the employees have spent on the different projects (there are 6) for the current week. Is there any way for excel to figure out the current week then add together the hours all the employees worked on these 6 projects? Thanks in advance. Hi, Take a look at the templates available from Microsoft at http://office.microsoft.com/en-us/template...

Run time error with Find Box and automatic DOLE
I have a form for sorting through a catalog of samples. I made a find box on my form for the catalog number so records can be browsed more easily. I added the following code to the before update property of the form to fill the date in the DOLE field whenever the record is edited. Private Sub Form_BeforeUpdate(Cancel As Integer) If (IsNull(DOC)) Then DOC = Date DOLE = Date Else DOLE = Now End If End Sub If I switch records using the find box on my form after having changed something in the form I get a run time error. "Run-time error '-214...

text label on scale
I have a combination area/ column chart. I would like to have part of my scale in text form - part numeric. Is there a way to do this? I've looked at appspro.com and no luck so far and the XY labeler doesn't offer the option. I could be missing the obvious though... Hi, Have a look at Jon Peltier's example. http://peltiertech.com/Excel/Charts/ArbitraryAxis.html Cheers Andy Maureen D. wrote: > I have a combination area/ column chart. I would like to have part of my > scale in text form - part numeric. Is there a way to do this? I've looked > at appspro.c...