Solved

Can't get total field in form to update

Posted on 2011-09-02
5
299 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

710 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