Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can't get total field in form to update

Posted on 2011-09-02
5
Medium Priority
?
303 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 1200 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

926 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