[AccessD] How to update the Changed field in a table

Bill Benson bensonforums at gmail.com
Mon May 12 10:47:05 CDT 2014


I thought about the oldvalue, but figured that this might get replaced if
they make two edits to the same control before leaving the record.

Maybe not, let me play with it.

Thank you.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert
Sent: Monday, May 12, 2014 11:20 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] How to update the Changed field in a table

Bill,

Bound forms are intended to make it easy to save the data without any code.
Moving from one record to another, or closing the form will cause the data
to be saved.

However, you can still do from level validation. Just to it in the form's
BeforeUpdate event. There you can do any validation you choose, and cancel
the saving of data simply by setting the Event Proc's Cancel parameter to
True.

You can also get at the old values of bound controls if you need to by
referencing the control .OldValue property.

Lambert

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Benson
Sent: Monday, May 12, 2014 6:13 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] How to update the Changed field in a table

This may be a good use of class modules.

 

I have bound controls on a form which is bound to a table.

 

I was hoping to have some sort of form level validation, as opposed to field
level validation, but it seems that when a form is on a record, that any
change made in a field is causing a change in that field. and there is no
resetting back to its old value based on field level validation or
confirmation - unlike unbound controls, which I can let anything the user
does to them occur until ready to save the record?

 

I want particularly, not to stamped the changed date with each and every
edit, but to 

1)      Only stamp the record if the user saves or exits the form

2)      Only stamp it once

 

Admittedly I have NEVER used bound controls, and maybe some of this behavior
is already inherent in Access.

 

Can someone tell me what they customarily do in this need?

 

 

--
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