[AccessD] doCmd.SaveRecord not firing Form_Before_Update event

Stuart McLachlan stuart at lexacorp.com.pg
Sun Jan 18 03:02:52 CST 2015


You can also just set "Me.Dirty = True" in code.

On 17 Jan 2015 at 22:41, Bill Benson wrote:

> Using my own noodle, here is what I determined:  The Beforeupdate
> event is apparently bypassed if the form is not "dirty". If the Help
> says that, I am not able to see anything about it. Since the controls
> driving this exercise were unbound, changing them and expecting that a
> Form Save would call the BeforeUpdate event was apparently
> unreasonable (!) on my part... so my update routines were not firing.
> I have since added some bound controls on the form, and updated those
> when the unbound controls change - and this is enough to make the form
> feel dirty, and then saving is calling the BeforeUpdate event (which I
> no longer even need, ha ha - since the bound controls are taking on
> the value of the unbound controls)... however this still makes me want
> to peeuuke.
> 
> On Sat, Jan 17, 2015 at 10:14 PM, Bill Benson <bensonforums at gmail.com>
> wrote:
> 
> > I am getting nearly work out with Access not behaving as I would
> > expect - and in this case, as Help tells me it should. I have a
> > process which needs to save an order record then create an invoice.
> > The invoice will have amounts for various types of fees calculated
> > as either based on an amount entered per bottle, or a flat amount;
> > but if a field FeeTypeid is set to a value such that looking up that
> > feetypeid in the FeeType table yields a feeType of 'N/A', I do not
> > want the amount to be calculated (ie, should be zero).
> >
> > This determination is to be made in the Beforeupdate event.
> >
> > However, upon saving the record, that event is not firing. I have
> > verified in the form property sheet that this event is set to fire.
> >
> > Any help out there? Arrrggghghhgg!
> >
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list