MS Access 2010

do you know how to view input time on record, created, modified.
Hiroyuki TamuraField EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeOwner, Developing Solutions LLCCommented:
unless you personally (or the application designer) added fields for dtCreated and dtModified to the table structure, then there won't be one.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hiroyuki TamuraField EngineerAuthor Commented:
thank you. do you know how to create a calculated field?
Rey Obrero (Capricorn1)Commented:
in the design view of the table, ADD two fields
- Created       Date/Time

Default value Now()

this field will have the current Date and time everytime a record is created

- Modified Date  Date/Time

for this to be populated, there are two ways
1. create a Data Macro to input the current date/time evrytime the record is updated
2. you can use VBA codes to update this field..
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

All of my tables have three tracking fields.

CreateDT has a default of Now() defined on the table.  The other two fields are updated using the BeforeUpdate event of each form that updates a particular table.

Me.UpdateBy = Environ("username")
Me.UpdateDT = Now()
Hiroyuki TamuraField EngineerAuthor Commented:
Screenshot.pngis this the way?
Rey Obrero (Capricorn1)Commented:
Do not select Calculated, select Date/Time  on the Data Type
After you select Date/Time as the data type, enter --  Now() as the default for your CreateDT.  The other two fields either have to be updated using VBA in the Form's BeforeUpdate event or via Data macros.  None of them are calculated fields.  

Calculated fields are fields whose value is calculated on the fly each time the record is viewed.  What you want is something that is saved permanently.
Rey Obrero (Capricorn1)Commented:

read carefully my post at http:#a40961228
Hiroyuki TamuraField EngineerAuthor Commented:
is this the way?
Rey Obrero (Capricorn1)Commented:
Yes, that is correct.

Now add a record to the table and you will see that the CreateDt field is populated with the current Date/Time
Rey Obrero (Capricorn1)Commented:
Also, in the Format property select  General Date
Hiroyuki TamuraField EngineerAuthor Commented:
Thank you, I got CreatedDTScreenshot.pngbut not updatedBy and UpdateDT


what's username?
It is the name of the user logged into the computer.  if you have a login form for your application, use that userID instead.  Go to the debug window and type
? Environ("username")
You will see your user id.
Hiroyuki TamuraField EngineerAuthor Commented:
thank you. where is debug window?
Hiroyuki TamuraField EngineerAuthor Commented:
Screenshot.pngunable to locate...
Open any code module.
From the View menu choose the Immediate Window
Hiroyuki TamuraField EngineerAuthor Commented:
Thank you. I got my user ID but still get following errorScreenshot.png
Where did you put it?    I told you that you had to use the expression in the BeforeUpdate event of a form or possibly in a Data Macro and I'm not even sure it will work in a Data Macro.  I don't write macros.  You'll have to check the list of available functions in the macro editor.  IT WILL NOT WORK AS A DEFAULT OR IN THE VALIDATION PROPERTY OF A TABLE.  The reason being that it is a VBA function.  Anything that is applied by the database engine is limited to those functions available in SQL.

Perhaps you need to tell us exactly what you are trying to do including what version of Access you are using and if you are trying to create an AccessWeb app.  Because, unless you are trying to create an AccessWeb app, you can do exactly what I told you to do provided you do it where I told you to do it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.