Save Calculated Form Field To Table
Oct 3, 2006I have a form which calculates alot of numbers. Im trying to figure out how to save the calculation to a table field. Is this possible? Can someone help me with a solution please
View RepliesI have a form which calculates alot of numbers. Im trying to figure out how to save the calculation to a table field. Is this possible? Can someone help me with a solution please
View Repliesi have a total in an invoice with is a tabulated form with totals in the detail footer I want to post the calculated total (control) to a table. How ia this done.
View 2 Replies View RelatedHello everyone,
I have been trying to calculate the number of working days a person has off sick between two dates.I was aware of how to calculate the difference between two dates using datediff, this was not quite hat i needed.
after much experimentation and a little searching I came across this site that has I would recommend to other beginners to use as a query and a module.
http://www.mvps.org/access/datetime/date0006.htm
I have a calculated field that uses this function to work out the number of days, My question is, Is it worth me saving this calculated field physically in my table instead of in the query?
The reason for this is that im only with company for limited time and others will be building reports in the future and would prob prefer to build reports on tables rather than queries. If so, how can I go about setting the field value to that of the query result?
What I'm trying to do: I have created an unbound field within a subform's footer to calculate the average of the displayed record values. The subform is in datasheet view. The records are returned based on a query with a relationship between two tables. I need the calculated data (which I currently have displayed on the main form) to populate within the master table.
I can't figure out how to automatically do this. I created a simple command to get it there, but I'd like the user not to need a button to display a calculation.
Main form based on TableA; subform based on TableB.
Here's how I have it set up (Btw, I suck at SQL I just figure this is easiest to read):
Query SQL looks like this: SELECT tblB.Field1, tblB.Field2 FROM tblB.Field1 INNER JOIN tblA ON tblB.Field1 = tblA.Field1
Main form: unbound txtbox = [Forms]![frmA]![subfrmA].Form.[txtAvg]
The field that is averaged is tblB.Field2. There are potentially a bunch of records displayed in the subform.
I need that [txtAvg] field to save to TableA. My command button is simply Me.tblA.FieldName = Me.unboundtxtbox. I'd like to do away with that.
I tried to use the on current or on load event for the main form; but the calculated field value is 0 until it calculates it. It seems like there is a short delay before the value shows up on the form at which point the on current or on load events don't pick up the calculated value; just the 0 that is initially there.
Hi,
I am a first time user to access groups, so I am hoping for a
good experience.
I have a form which has a calculated control. But the calculation
shows on the form but is not storing in the record.
On the property sheet, the name is charge and the control source is
the calculation (=[source1]+[source2]...)
Why is it displaying but not storing? I do not know Visual Basic, so I would
like a solution that is simple if there is such a thing.
Thanks in advance,
Trainjoan
Hello,
I have been reading various threads about this subject and I know that one shouldn't store a calculated field in a table.
I believe this may be an exception to the rule (but I could be wrong).
I am making a pricing database that will use a few manual inputs and the rest of the fields will be calculations (gross/profit margin, expenses) based off these inputs. We need to have these calcuated fields stored because they are essential to the pricing decisions and we will have to go back and access these fields at a later time. Another reason for this is because there will be at least one report that will be used to compare prices and calculated fields associated to a certain product by company, program, item type, ect...
Any help would be greatly appreciated.
i want to insert a calculated value of a e.g field6 (field4 * field5) in forms into the database table. by using expression builders in my forms. i have made that feild and on click it shows the calculated value but on filling in the rest of the form and clicking on Insert button does not update this calculated field but iserts all other fields.
View 3 Replies View RelatedA textbox on a form concatenates 2 strings. I want to insert that resulting string into a table .how can i do that ?
View 1 Replies View RelatedI've read over and over that calculated data is bad, that's fine with me... but here is my dillema...
I have four fields that interact with my calculation in a single form. There is only one table in the database.
AmountF (The stored data in the table) (amount financed)
FC (calculated by =[amountf]*.25) (finance charge)
Amount Paid (used in calculation of total due)
total due (calculated by =[amountf]+[fc]-[amount paid])
The math already works, everything works. I can choose to print the form and it looks great. However, I would like for it to (when I'm done printing the form) somehow save the total due data to the AmountF column in the table. AmountF is in the same line as all the other information, so I would like it to not create a new record just update the old one.
All four of these fields have a text box in the form for themselves.
I am creating a database to keep up with the expenses for my art business. I have a table for Vendors with a field (Mileage) for one-way mileage that I enter manually (EX: 11.8 miles). Then I have a calculated field that basically just multiplies the Mileage field times two to get total mileage to and from my house to vendor location. (Total Miles) {The reason I want to do this this way right now is because I didn't keep up with my mileage this year and I am having to look up the distance from my home to each location)
Then I have a "supplies" table where I show the date, the vendor, the item, cost, etc, and I want to add a Total Mileage field based on the calculated Total Miles field in the Vendors table that will automatically populate based on the vendor of each transaction. I just can't remember how to make this work and I know just enough SQL to be dangerous.
I need to make a calculated field show up on my table. My database is for technicians at work to log their hourly health checks. I have a field on form "Health Check" called "HC_ID" that I automatically bring over to the next form called "Channel_Scan_Form" with the control source property. I would like the data from this field to copy to the accompanying table called "ChannelScan_Table" from this "Channel_Scan_Form". I have tried to place the code in several different events on the property sheet but haven't had any luck bringing the data over to the table. I'm just starting to play with databases, plan on being here for a while and hopefully contributing in the future.
View 6 Replies View RelatedTable1 contain Two fields (3Months) and (6Months)
Table2 contain Two fields (3Months) and (6Months)
the table 2 is the source of a form that will let the user change the numbers. table 1 should change Date1 and Date2 Fields based on the two fields (3months) and (6months) if i want to make a lookup wizard it should be changed manually and if i make a calculated field i can't find other tables in the expression builder
I have what is probably a stupid question but I've been struggling with this one for a while. I have an ordering database which has an Orders table (containing Order ID, Date, Supplier etc) and an Order Line table within which I have a combo box for Product name, supplier, price, VAT rate, Line price etc. At the moment, I have the order line table as a subform within the Order form (run from the Orders table). The problem I'm having is the subtotal and total fields. At the moment these are in the Order Line table as I cannot figure out how to get these in the Orders table. In summary, can I make a calculated field in one table that calculates values from another table (linked by Order ID)?
View 3 Replies View RelatedHi folks,
Is there a way to have a calculated field within a table? I have a table that I've added four fields to: AmountIT, AmountRE, AmountKK, AmountRes. I want to be able to sum these four fields to give AmountTotal, but is there a way to have in a table?
Im not sure the best way to go about this and would be most grateful if I could be pointed in the right direction.
If I had a table called tblEmployee and a field within it called "PayRate" and another table called tblHours with a field in it called "LabourCost" and a field called "Hours". What is the best way to hold the "LabourCost" value so it doesnt get affected if someones "Payrate" is changed.
I expect I have asked this all incorrectly and I really do apologise.
Many thanks in anticipation... :)
In an orders table, i want to have a total value calculated... in the table... i was only able to do that in a query... but is it possible to do so in a table?
View 6 Replies View RelatedI am calculating a field fldD. I have added the following to the Control Source of fldD "=[fldA]+[fldB]+[fldC]"
Can I save the value that is created back to the table i.e. fldD will be the value of =[fldA]+[fldB]+[fldC]
Does this sound like a corruption problem?
I added a new field to a table, and saved the table. When the table is reopened, the new field is not there! I thought perhaps I forgot to save the field, so I tried adding the field again. When saving, the error said, "cannot save; duplicate field name".
If I go to toolsoptions and click the "show system objects" the field will show up??
Do you think the best course of action is to import all the objects into a new db and try again?
Thanks for your help.
Mary
Hi,
I know it breaks all the rules to store a calculated field on a table, but I've painted myself into a corner with the way I built this particular database, not good, I have repeating groups and basically the whole database is built this way. I need one form to store a calculated value on a table to solve a problem on a report that encapsulates the total of all the repeating groups. Before you start the lecture, I know I messed up, but this is way to far down the road to start over. Any help would be greatly appreciated.
Gary
Is it possible (and logical) for me to create a table with a calculated field from 2 other fields in the same table? Example; I have a long time field (mm/dd/yyyy hh:mm:ss) aka StartTime, and a long time field EndTime. I would like to subtract the StartTime field from the EndTime field to get the total time elapsed, but in hh:mm:ss format. I can get it in hh:mm format, but I really need the hh:mm:ss format. Any Ideas? :cool:
View 4 Replies View RelatedI've learned the hard way about using calculated fields in a table. I used on while building in Access 2010 for users that will be using Access 2007. Once my testers pointed out the error message, I did some research and realized my calculated field was the problem.
So, I created a query to replicate the calculation, deleted the offending field from the original table and redirected everything to point at the new query vice the original table.
However, my testers are still receiving the error about needing version 14 to access that table. There isn't a calculated field there any longer, but they still can't access that table. Did that calculated field put some sort of taint on my database that can't be removed? I'm not sure what to do. Do I need to start over, so that a calculated field was never part of the database to begin with? If so, how much of my existing one can I reuse?
Access 2013
I am trying to add some numbers together for a number of fields, of which at least one field will either be 0 or empty. I am trying to use the following formula in a calculated field in a table:
IIf(IsNull([Price Increase %]),[Total],([Total]*[Price Increase %])+Nz([LumpSumAnnualIncrease]))
Access returns an error statement: The expression XXX cannot be used in a calculated column.
Is there a different formula I should be using, or a work around, other than using the formula in a query.
I did the calculated fields in my table but in my datasheet they are not appearing. Are they not supposed to show there? I have not created any forms yet.
View 1 Replies View RelatedI need to populate a table with Grid reference values consisting of 6 figure integers, eastings and northings.
I am receiving/downloading the Grid Refs in a UK Grid Tile format, with 3, 4 or 5 figures preceded by letters.
E.g. SK 456 849, SP 6789 4356.
I have used some query functions and written a bit of VBA behind a form to convert the received coordinates into the full coords I want. The coordinates are now in unbound controls on a form, and I want to pass these back to a table so I can use the data for display purposes.
Ideally I want to link to the table from a GIS and autoupdate without having to open the database (my imported data is linked in to feed the database automatically).
I have done some searching and not found a method to pass the values into a table - What is my best way of doing this automatically?
Access 2010.
Have a table with columns of data which I want to total at the end of each row. The Calculated Field does this simply enough but it only seems to be able to add whole integers? How do I get it to accept and add values to 2 decimal places?
Is it possible to make a calculated field in a table not allow duplicates?
There is obviously no option to select No Duplicates in the field settings?