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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
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.

735 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