[AccessD] BeforeUpdate v. AfterUpdate

John Colby jcolby at colbyconsulting.com
Tue May 20 16:24:39 CDT 2003


After learning about collections, I tend to set up a collection, use the
control name as the key and the control value (or oldvalue in this case) as
the data.  This allows me to "index in" to the collection later using the
control name to look up whatever I stored in the collection.

John W. Colby
www.colbyconsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Heenan,
Lambert
Sent: Tuesday, May 20, 2003 5:18 PM
To: 'accessd at databaseadvisors.com'
Cc: 'cfoust at infostatsystems.com'
Subject: RE: [AccessD] BeforeUpdate v. AfterUpdate


I use the Tag property for multiple purposes, and use a simple ";"
(semicolon) delimiter. Then I can  pick out the 'fields' in Tag to see if
the one I'm interested in is present - usually I just use Instr() for the
purpose.

Lambert

> -----Original Message-----
> From:	Charlotte Foust [SMTP:cfoust at infostatsystems.com]
> Sent:	Tuesday, May 20, 2003 10:41 AM
> To:	accessd at databaseadvisors.com
> Subject:	RE: [AccessD] BeforeUpdate v. AfterUpdate
>
> I often use the Tag property for that purpose instead of a variable ...
> Except when I'm using Tag for something else, of course. <g>
>
> Charlotte Foust
>
> -----Original Message-----
> From: John Colby [mailto:jcolby at colbyconsulting.com]
> Sent: Tuesday, May 20, 2003 5:40 AM
> To: accessd at databaseadvisors.com
> Subject: RE: [AccessD] BeforeUpdate v. AfterUpdate
>
>
> OldValue is set to Value when the data stores, thus by AfterUpdate the
> OldValue data has indeed been lost.  Use BeforeUpdate to store the value
> to a variable, then compare to that variable in AfterUpdate.
>
> John W. Colby
> www.colbyconsulting.com
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Arthur Fuller
> Sent: Tuesday, May 20, 2003 9:29 AM
> To: AccessD
> Subject: [AccessD] BeforeUpdate v. AfterUpdate
>
>
> >From my experiments, it appears that MyControl.OldValue is available
> >for
> scrutiny only in the BeforeUpdate event. In the AfterUpdate event it
> seems to be lost. I just wanted to confirm this hypothesis.
>
> The point of the exercise is that I need to keep track of which columns
> a user has changed and then take action accordingly. I have to update
> some columns in another table depending on which columns changed in the
> current table, but only if the update to the current table was
> successul. I don't actually care about the old value, I'm just using it
> to determine which columns changed. But by the time I get to AfterUpdate
> I've lost the information.
>
> Any suggestions as to how to work around this?
>
> TIA,
> Arthur
>
> _______________________________________________
> 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