How do I get a form calculated value into a table.
Posted on 2014-08-22
Access2003 running in Access2010
History this db was started in Access97 was not intend to grow into and office management app. It was to write specifically structured manufacturer mandate warranty forms.
It now maintains inventory, invoices, work history, man hours, client info, and history of maintenance done on each piece of equipment that the client has some up to 500.
It is intended to be completely rewritten in Access 2010/2013 after the first of the year.
Have this code that when you click the refresh button(in the footer of the form) it updates the field "InvoiceTotal" from a calculated field on a form
It works fine unless you have click happy users. If you double click refresh , it not only does not update the table but it blanks out any previous data.
So if I rem out this line " Me![InvoiceTotal] = Me![InvoiceTotalCalculated] " it will not update table and it does not erase existing data in the table
These are the fields "[Total] + [Text144] + [Text150] + [Text152]"( all calculations from other sub-forms) used to calculated the field InvoiceTotalCalculated
" InvoiceTotal " is the field in the table to be updated.
Private Sub Command191_Click()
On Error GoTo Err_Command191_Click
' InvoiceTotal = [Total] + [Text144] + [Text150] + [Text152]
Me![InvoiceTotal] = Me![InvoiceTotalCalculated]
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Have been working for many weeks off and on trying a multitude of things to no success any assistance would be greatly appreciated. I am not a full time programmer, I live in a rural area and have a full service computer business servicing many small business.