Re: 'Lord Help Me' Project

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Laura,

as an add-on to what John said, if you are using SUM in a control, it acts on SAVED records... ever notice the pencil icon in the gray record selector area to the left of the record? That means that data is not yet written... a solid right-pointed triangle signifies no changes have been made to the record since it was saved

if a field is used in a calculation, on the AfterUpdate event of its control:

me.dirty = false

will save the record

if you are moving out of a subform, you might put this on the OnExit event of the subform control:

if me.dirty then me.dirty = false

btw, my attention was drawn to this thread because of the excellence that BruceM has with words...

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*



laura reid wrote:
You people ROCK! Thanks so much, I'll give this a try at work tomorrow. Should you get bored here, I've posted a request for help with a query I want to design in the query newsgroup ;)

with much gratitude,
Laura

"John Vinson" wrote:

On Mon, 16 Oct 2006 06:08:02 -0700, laura reid
<laurareid@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Yes, requery is the way I went. However since the user is never permitted to change any fields in the main form, I ended up placeing a button on the main form footer and after all the changes in the various subforms are made, the user then presses the button to get a new total.
Just FWIW, you can put a line

Parent.Requery

or possibly also or instead

Parent.Recalc

in the AfterUpdate event of each Subform which contributes to the form
total; this will make the button press unnecessary.

John W. Vinson[MVP]

.



Relevant Pages

  • Re: Dsum Re-calc of subform values
    ... John, I took your advice, moved the fields to the subform and am using your ... >>I have a few DSum fields on a parent form which calculate totals based on a ... > If one such textbox is named txtSumA, you can then set the control ...
    (microsoft.public.access.formscoding)
  • RE: Wrong data in a field
    ... > I have an error message both in the before and afterupdate event after ... I don't understand the access chain for the control. ... 4c) If you are trying to find a control on a subform, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Which event to use when updating form when subform updated ?
    ... I thought about this but this control only updates when I move between ... the price field in the record. ... update in the subform when the current record is updated, ... > Use the AfterUpdate event of the form you're using as a subform. ...
    (microsoft.public.access.forms)
  • Re: Default value of a text box.
    ... AfterUpdate event of a control, "Hello World" won't appear as the default ... John gave me the following ... M. Shipp ...
    (microsoft.public.access.formscoding)
  • Re: on change event
    ... Sandra Daigle wrote: ... probably also want the AfterUpdate event of the control so that the subform ...
    (microsoft.public.access.formscoding)