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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can not open the Access Help ? 3 54
Normalization of a table 19 74
Dlookup MSACCESS 5 25
Calculate Time acces 2010 12 29
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

777 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