Solved

Module Help on getting an Update field to populate with today's date when another field is changed

Posted on 2004-09-28
3
171 Views
Last Modified: 2006-11-17
I've got a project tracking database.  Management would like to know when the projects are updated by the employee they are assigned to.  I only need a date stamp when any field in the project record is updated.  I've created a date field and named it "UpdateDate".  I thought my best option would be to put the following code in for each field in the form (There are only 7).  However, its not working.  Are there other options to get today's date to populate the "Update Date" field whenever a user updates a field within a record?    Also, I goofed when I named the fields.   I used spaces in the names (example, open date when I should have made it opendate).  Do I put quotes or brackets around these field names?  Here is the code I tried using.

Private Sub Opened_Date_AfterUpdate()
Me.UpdateDate.Value = Date
End Sub

Thanks for the help.
0
Comment
Question by:MissB618
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
dannywareham earned 125 total points
ID: 12171992
Your code should be:

Me.NameOfTextBox = Date

The control (NameOfTextBox) should be bound to your table to store the date of amendment
If you want to track when a record was changed, you can use the OnDirty event of the form.

This is triggered when the current record is amended in anyway (even if the values are changed then returned to their original value)


Nb.
A proper tracking dbase is available at:
www.mvps.org/access/modules/mdl0021.htm
0
 

Author Comment

by:MissB618
ID: 12194955
Thank you so much dannywareham.  As it turns out my boss changed his mind on what he wanted to I won't be able to use your solution.  Thank you so much for your time.
0
 
LVL 26

Expert Comment

by:dannywareham
ID: 12198257
Not a problem MissB
If you need any help with your new project, drop us a line

:-)
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question