[AccessD] doCmd.SaveRecord not firing Form_Before_Update event

Charlotte Foust charlotte.foust at gmail.com
Sun Jan 18 07:57:57 CST 2015


I've done it that way too, Stuart.  I usually set a flag in the afterupdate
of the unbound controls and check that as part of an IsValid routine that
is called before the form loses focus or updates or is closed.


Charlotte

On Sun, Jan 18, 2015 at 5:46 AM, Stuart McLachlan <stuart at lexacorp.com.pg>
wrote:

> I've never tried it with individual controls.  I always set the Form's
> Dirty property with Me.Dirty
>
> On 18 Jan 2015 at 8:26, Bill Benson wrote:
>
> > No tried first thing, but I could not. Got an error about control not
> > being in focus. If you need more details I will try to recreate it. I
> > tried to make for dirty on every unbound combo after update. No go. On
> > Jan 18, 2015 4:05 AM, "Stuart McLachlan" <stuart at lexacorp.com.pg>
> > wrote:
> >
> > > 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
> > > >
> > >
> > >
> > > --
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > http://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> > >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
>
> --
> 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