troubleshooting Question

How do I get a form calculated value into a table.

Avatar of a52dragon
a52dragonFlag for United States of America asked on
Microsoft Access
11 Comments1 Solution170 ViewsLast Modified:
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
    Exit Sub

    MsgBox Err.Description
    Resume Exit_Command191_Click
End Sub

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.
Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros