Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
175 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 500 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

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.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

664 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