Solved

Can't get total field in form to update

Posted on 2011-09-02
5
298 Views
Last Modified: 2013-11-27
Great Day, I have a form that calculates service items performed by a technician. Each time the user enters a service item and and associated cost or if he/she edits an existing cost, I want txtRepairTotal to update, but this does not happen until I move away from the record and then return. I have Do.Cmd.Requery "txtRepairTotal" in the AfterUpdate event, but it is not giving me the expected results. There is no change to txtRepairTotal.

Thanks in advance for your assistance,

r/David
0
Comment
Question by:yddadsjd95
5 Comments
 
LVL 7

Expert Comment

by:BusyMama
ID: 36473950
[txtRepairTotal].Refresh

I think will work
0
 
LVL 42

Accepted Solution

by:
dqmq earned 300 total points
ID: 36473952

me.refresh
docmd.requery
0
 
LVL 42

Expert Comment

by:dqmq
ID: 36473964
Perhaps I jumped the gun. What is the control source for txtRepairTotal?
0
 

Author Closing Comment

by:yddadsjd95
ID: 36474032
Thank you BusyMama for reaching out, but the code did not work.

dgmg, the control source for txtRepairTotal is the sum of the individual repair cost - =(Sum([RepairCost])), and your code did work. Thank you much.

Everyone have a great day and an even finer day tomorrow!

r/David
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 36474042
you have to create a function that computes the total and call the function in the afterupdate event of
*service item
*associated cost
*existing cost
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question