Solved

Can't get total field in form to update

Posted on 2011-09-02
5
295 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 119

Expert Comment

by:Rey Obrero
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Suggested Solutions

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now