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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now