AboutScottgem Expertise I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.
Experience I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.
Organizations Author of Microsoft Office Access 2007 VBA Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing
Expert: Scottgem Date: 6/12/2005 Subject: Date Record Created
Question Hi Scott,
I have a field in my database that I want to show the date the record was created, with the possibility to update it to a more recent date.
How do I do that?
I'm using Access 2000
Right now expression builder says
=CDate([Ğdateğ])
but that's not working right.
Answer I routinely add 4 fields to my data tables; CreatedBy, CreatedWhen, EditedBy, EditedWhen. For CreatedWhen I set the default on the table level to =Now(). For CreatedWhen I add a hidden control to my forms with a default of =fOSUserName(). Note: this functions picks up the netwrok login ID, you can find the code for this function (its not in Access) at www.mvps.org/access.
For the Edited fields, I add hidden controls to my form, and use the Before Update event of my form to run these 2 lines of code: