Force date update when a record is updated in a table, not a form.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I imported our records to Access from Excel. Fields were added for "Last
Updated Date" and "Last Updated By". On all new reords the fields are
required. I want to force the fields to be updated evertime a record is
updated also.

We are not using forms as of yet. My group likes to update the tables
directly because they are used to Excel. I know if I create a GUI interface,
an update page can be made to handle this, but I am far from ready for that
yet.

I would like to force the updates on the tables.

Any suggestions?
 
You can't do that at the table level. Coding is done through forms. You
need to get your group to use the proper tool for the job. Allow them to
access the table directly lets them get around all your edits, coding,
restrictions, and formatting. I'd never let my users get to the tables
directly. Way too risky.

Rick B
 
On Wed, 8 Dec 2004 12:27:18 -0800, "Michael Celeratas" <Michael
I imported our records to Access from Excel. Fields were added for "Last
Updated Date" and "Last Updated By". On all new reords the fields are
required. I want to force the fields to be updated evertime a record is
updated also.

We are not using forms as of yet. My group likes to update the tables
directly because they are used to Excel. I know if I create a GUI interface,
an update page can be made to handle this, but I am far from ready for that
yet.

I would like to force the updates on the tables.

Any suggestions?

I'm with Rick. Table datasheets are NOT suitable; they have no
programmable events, for one thing.

A possible compromise would be to use a Form in datasheet view. You
can put code in the Form's BeforeUpdate event:

Private Sub Form_BeforeUpdate(Cancel as Integer)
<put any validation code first>
Me![Last Updated Date] = Date
Me![Last Updated By] = <the user ID, from a form or from code>
End Sub


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top