Updating calculated fields in access Granny live x chat
I wish I could figure out how to attach my test database to show you.Hi, I have a form which updates my table just fine except for some fields in the form are expressions, and the results of the expressions do not populate the table, but the form always remembers the results of the expression.I hope somebody can help either through SQL or a script. Do you want it in just years or years, days, months, minutes, seconds?Grabro Sounds like you have two distinct issues here. Centinul Displaying the record is not a problem except that when they are displayed the duration and age columns will still show the years when that particular record was entered or specifcally updated.Regarding keeping the calculated value updated in the table....You could create a function (in a module) to update the totals field in the table.I would like this field to update every time a product is added, changed, or deleted (via the subform) to reflect the subtotal in real time. Now to get the total of the subform to the main form you should put an unbound control in the subform call it txt Record Total and in the control source put =Sum([Ext Price]), set it to visible = false Now on your main form put an unbound control box and call it txtsfrm Total then in the control source put =sfrm Sub. txt Record Total Make sure you change sfrm Sub to suit the name of the control that is the subform on you main form.
Click Here to receive this Complete Guide absolutely free. The last two columns are calculated based upon the first two respectively.
Hi, I've got a Sales Entry Form with a Products Sold subform.
I have a calculated field on the main form that sums the prices of the products sold associated with the sale. nfw04, In you subform I assume you have quantity and sale price so in the query that is the source for your subform you should have something like this; Ext Price: [quantity]*[sellprice] This should show in your subform.
Best practices is that you NEVER will store calculated values or Expressions as you're putting it.
Hope that helps, If you have more questions, please feel free to post again. The simple answer to that is because it is calculated. Because if for any reason that the values change, then you have to update many fields and rows of data in order to keep the information accurate.