Calculating Two Fields From A Form And A Subform
May 6, 2005
I have created a form with a subform and I want to subtract the total of the subform from the total of the form to get a balance; i.e. I have a total of expenses on the form and the subform is a record of payments against the expenses and I want to show a balance.
I have been all over this one and can not make the expression work. I have been working in Access for some time but this one has me stumped, I am probably over thinking it or just can't see the forest for the trees.
I have gone into the expression builder and created the formula but when I complete the process I get the #name? error statement in the field.
Can anyone help me with this problem? Thank you in advance. You can send responses to sharon.dunn@newmont.com.
View Replies
ADVERTISEMENT
Sep 25, 2006
Ohh Stress. Need Help....I have a mainform that contained two subforms in it. MainForm called "Employee", the two subform called "vac", and "Prevac". There is a field in my mainform called "Hours", that I'd like to use to Add with a field in Vac subform called "VacA" and a field in Prevac called "FHours". I'd like to display the total (sum of all three field on the same mainform. Is there anyone have any idea? Thanks in advance...
View 3 Replies
View Related
Jun 20, 2006
Hey Everyone,
I am stuck trying to figure out this problem. I have a main form "frm_tirelog_600" which has 4 combo boxes "cboleg",
"cbocar", "cbopos", "cboserial" on it. The first 3 combo boxes are used as criteria on 1 of 3 subforms that I have.
The fourth combo box "cboserial" is used for the criteria in a query on another subform that I have called "frm_mount_600_subform",
which is independant from the main form, I hope I have explained that clearly enough. What I need to be able to do is
have the subform fill in 3 of the fields on it "leg", "car", "pos" with the value from the 3 combo boxes on my main form. I
can get it to show in the fields but not write to the table. I have searched the forum and have not been able to locate anything
that would work and really need any assistance with this. Im not real strong in the coding department which is where I
beleive this could be done.
I have attached a copy of my DB which I hope will better explain it. Any help would be greatly appreciated
View 8 Replies
View Related
Aug 4, 2005
I have two tables - Hours and Employees. Employees table has these fields:
EmpID, and First, and Last name.
Hours table has these fields:
EmpID, Hours, Funding Source, Nature of Work, Pay Period
I need to produce a report or a query that will display these results:
A column with a list of all the employees and all the Nature of Work categories going across with the sum of hours for each Nature of Work. I'm attaching an Excel spreadsheet that shows kind of what I need. Also, these reports need to be produced for each Funding Source and
Pay Period, so something like [Enter Funding Source] and [Enter Pay Period]
My question is that I don't know how to make a report that will just list a column with all the names and count the sum of hours for each Nature of Work.
Hope this is not too confusing, and any help would be greatly appreciated. thank you!
View 8 Replies
View Related
Oct 26, 2005
Hi,
Attached is a project I'm working on. We want to calculate the total delays on each day. In a form called 'main' there is a subform for the delays on that date. But the 'Total Delays' control does not work.
I have used the following format to get the total from the subform:
=Delays.Forms!TotalDelay
'TotalDelay' is the name of the control which calculates the total of the delays within the subform.
I have used the =[Delays].[Forms]![TotalDelay] format in other projects and it works. However in this program when I want to save the form, the control source is changed to :=Delays.Forms!TotalDelay (the brackets are removed)
Thank you
View 1 Replies
View Related
Sep 17, 2004
I have a Main form with a sub form. Every record in the main form has multiple sub form records. (they are linked in a one to many relationship)
Each subform record has a "price" text box. I would like a total of all the "price" text boxes for that main record to be displayed in the main form.
It needs to be updated when a new subform record is added or changed.
Any help is welcomed. Thanks in advance
Joe
View 7 Replies
View Related
Feb 22, 2006
I have created a form with company ID, company name, and so on. I put a subform in the main form which includes invoice & points information. Somehow I need to calculate a balance for each customers points. In the form I have points earned and points redeemed...how would i get the totals for each customer's balance?
The main form is linked to the subform, so that you can see each individuals record of points. Please let me know how I can get the balance for each customer.
Thanks.
View 1 Replies
View Related
Nov 10, 2005
i have two text boxes in a form:
1) Todays Hours
2) Total Hours
when i enter a number in text box todays hours i want the value in the text box total hours to increment by that amount. this operation will be done on a daly basis for a internet cafe where the user comes and i put in the hours. it seems simple but i really do not know. could someone help me please :confused:
View 1 Replies
View Related
Dec 20, 2007
Hi,
I am creating a form which has many fields which should have values in them. I need to know how to total all the fields across each field.
I have managed to do this(almost!) by creating a text box, and "on lost focus", putting the VBA:
TextBox = [SumOfConnection Bonus] + [sumofspice bonus] + [sumofvolume bonus]
(When I get this working I'll make a field in the table so there is no need for the text-box.)
This is basically, three types of commision that I want to total at the end in a "total". The amounts of commision are obviously different for each record but when I click in the "TextBox" it totals the values for the record that box is in ONLY, and all records show the same value in this field. I will click in a different box, and it will change, but ALL of them will change. How do a make it so that all "TextBox" field will show their own value.
Thanks,
View 2 Replies
View Related
Nov 28, 2011
New to Access Form Design. Trying to create a form that will display the amount that is owed to an employee.
Our office gives its employees a $125 supply allowance each year. When an employee submits a receipt for a partial amount (say they spend only $35), I enter the amount in the PurchaseAmount field of my subform.
The ReimbursementField control source is =IIf([PurchaseAmount]>=125,125,[PurchaseAmount]).
The correct amount of $35 is displayed.
(There is no beginning balance or ending balance field on the form.)
When a subsequent purchase amount is entered and is over the amount of the remaining balance, (let's say spent $100 and only has $90 remaining) how can I have the form display the correct amount of $90? The closest answers I came across suggested using recordset clone in an AfterUpdate event, but I just can't figure out the proper way to write the calculation. My main form name is "Supply Purchases"; subform name is "Supply Purchases Subform.
View 4 Replies
View Related
Feb 22, 2007
I'm trying to create a database for a Cattery business.
One thing I'd like to include is a query that calculates how long a cat has been staying at the cattery and then calculating the amount owed by the owner.
I don't have a cost field in any of my tables, so I need to create this on every run of the query.
So for example
A Cat resides in the cattery from the 22nd of Feb to the 28th of Feb. So 6 days (not including the day the cat is brought into the cattery) at a cost of 4.95 a day equals 29.7
Heres what I have so far
http://www.tdh1987.co.uk/pics/query.JPG
Bear in mind I'm from the UK, so the date field is in a different format to yours.
Any help will be greatly appreciated.
View 3 Replies
View Related
Oct 3, 2006
I have a table for invoices that need to show Nett, VAT & Total. I have set up a form and have included a calculation on both VAT (Nett*17.5/100) and Total (Nett+VAT) which works well in the form. Because these calculations are in the ControlSource, I do not know how to have these fields bound to the original table.
Am I missing something really obvious???
View 1 Replies
View Related
Jan 4, 2005
I am new to Access and have made a databse using Access 2000. This is used for a dart league.
In one of the Tables called Members each "record" is made up of the persons details
(Name,address, etc). Included in the Row record I have "fields" (columns) that keep track of
the points each person hits on a nightly basis. I also have a Total Field.
Exampleof fields)
ID#,First Name, Last Name, Address, Phone #, Week 1, week 2, week 3, Total
How do I get the Total Field in the record to add up the nightly points in Week 1 + Week 2 + Week 3.?
In Excel it would be a simple calculation (e.g =sum(a1+b1+c1) etc.
As I said I am new to this database and it is very frustrating at the moment. I have used the help function
but it mostly double dutch to me.
ANY HELP in plain english would be appreciated
View 1 Replies
View Related
Oct 9, 2013
On my master form I have a subform called invoices this is tied by Site Number to the record on the form which is has the following important information, site code. group code, exp code an amount.
On another subform via a query I have a summary of all the invoices by exp code and group code.On another subform I need to create a Income an Exp.
I have two combo boxes 1 for the Group Code, and another for the expense code what I want it to now do is look up group code exp code = Total amount. There is currently only 1 line as you will see but there will be many rows of summary data...do i need a subform for the summary?
And I need to do it this way as not all exp appears on the income and exp and I want to be able to lay out the expenses for each site differently Attached is the zip file, of the database the only record that has data is site code 0289S
View 2 Replies
View Related
Jul 18, 2005
I have an Invoice Form with a Payments Subform. Here are the details:
frmInvoice
InvoiceID
Customer
ShipmentID
QtyShipped
UnitPrice
frmPaymentsSubform
PaymentID
InvoiceID
CheckNum
DateReceived
Amount
An invoice can be paid in multiple payments. (One-to-Many Relationship).
I have a calculated field that takes QtyShipped * UnitPrice, which gives me my total due. That works correctly. However, I want to have another calculated field that sums all of the payments (the Amount field). Then I want another field that takes the difference between the total due and the sum of all the payments, and gives me a Remaining Due calculated field.
Right now, my TotalPaid and TotalRemaining fields are marked with '#Error'. Is that because TotalPaid is a running sum? Every day I can go in and add a payment to an invoice, so the number would be constantly changing until it was paid in full.
Any suggestions would be great!
View 10 Replies
View Related
Nov 20, 2007
I am working on a system to store financial information. I will be extracting our accounts payable journal entries on a monthly basis into Excel. I want to import that data into an Access table. I have several calculations to perform to create new datafields that I need to store in my Access table. Is it possible to perform these calculations as I load the data? If so what the best method to do this? Here is an example. I will be downloading our monthly hardware depreciation and need to split it among departments based on % stored in another Access Table.
Thank you for any help you can provide me.
Teresa
View 1 Replies
View Related
Dec 21, 2005
I have a table with products and their costs per unit of measure.
some products are costed by weight and others by piece.
table looks something like this:
product
pcs
weight
unit of measure (EA or KGS)
cost
Query should look like this:
product
pcs
weight
Total Cost
Is it possible to write an expression that, depending on the unit of measure uses the pcs or weight field to calculate the total cost ??????
View 5 Replies
View Related
Jul 30, 2007
I've imported an Excel file into a table and now I've created a Query from it.
I now need to Add Fields (names are not in the table) and calculate totals for these renamed fields some of the answers are going to be the result of two or three fields.
Any help would be greatly appreciated.
thanks
View 8 Replies
View Related
Jan 27, 2008
Below is an example of my table "Pricedata" include 03 fields:
Stock Name ___Price________Status Date
A________________10________ __1/6/2008_
A________________11___________1/7/2008_
A________________12___________1/8/2008__
B________________22___________1/6/2008_
B________________25___________1/7/2008_
B________________29___________1/8/2008__
C________________2____________1/6/2008_
C________________2____________1/7/2008__
C________________3____________1/8/2008_
D________________56___________1/6/2008_
D________________45___________1/7/2008_
D________________27___________1/8/2008__
I want to create a query like this: can calcualte the price change and % price change in certain period, and then sort in % change.
This result should be like the table below:
StockName Change in three days % Change in 03 days
C 1 50%
B 7 31.8%
A 2 20%
D -29 -51.78%
Thanks all,
View 6 Replies
View Related
Sep 6, 2005
Morning All,
Just wondering.
When a form needs a calculated field. Say something simple, like
TotalCost = Quan*Cost
Is it better to create a query?
Use a table and create the calculated field in the query builder?
Or use a table and create a new unbound field on the form with the formula in it?
I never really know which one to do.
Lately I’ve been using saved queries for almost everything and now I have several dozen in this data base and its only half way done. Soon I’ll have to create a data base just to keep track of the queries in this one.
View 7 Replies
View Related
May 27, 2014
I am trying to create an expression that determined by text fields. The field is a PASS for FAIL field. The result needs to =PASS if 70% of the total column is PASS.Can this even be done using an expression?
View 4 Replies
View Related
Nov 22, 2006
Hi,
I have a form linked to a subform by an activity field, Both have a UID field also. I want to store the UID from the main form in each record in the subform. How do I link the two? I've done it before but cannot remember how and have been trying now for AGES! Any help would be much appreciated :)
View 2 Replies
View Related
Jun 15, 2013
In this table I have two fields Seats Available and Seats Remaining
When I register a student to a Course in the Courses table I would like the corresponding Seats Remaining field for that course to decrease automatically.
I can, of course, run a report or a query to see how many are enrolled in the course and then manually update the Seats Remaining field (which is what I currently do), but I would like this process to be automated each time I register a new student.
View 4 Replies
View Related
Oct 2, 2014
My training database requires me to identify each training record in the tblEmpTrainHist table as either "Compliant" or "Delinquent". I thought a simple calculation in my query:
RecordStatus: IIF([DateReceived]<=[DateDue],"Compliant","Delinquent")
would do the trick. However, I did not consider the records where the employee has not yet completed the training and the field [DateReceived] is Null. There are two considerations: those employees who have no [DateReceived], but have not yet reached the DateDue (Compliant); and those employees who have exceeded the DateDue (Delinquent).
View 5 Replies
View Related
Jul 8, 2015
I have been trying for about 8 hours to calculate elapsed time between two fields into a third field in Access 2007. Unfortunately, the expression
IIf(IsNull)([Final Suspense]),DateDiff("d",[Routing Status Date],Date()),DateDiff("d",[Routing Status Date],[Final Suspense]))
is not working. Image enclosed....
View 6 Replies
View Related
Sep 7, 2013
I have a [Order Central table] that compiles products from four different categories that employees can order from.
Employees using the database will select from four categories on buttons which opens up the order form EX: [Category 1 form].
They enter their order info on [Category 1 form] into a subform sourced from [Category 1 Table] called [Category 1 subform].
Is there a way that they could select the "Category 1" button, which would run a macro opening [Category 1 form] with the [Category 1 subform] having a where condition of 1=0 (or just so that the subform appears blank)?
View 7 Replies
View Related